Chmod

  • Hurley
  • Born
  • Born
  • Hurley
  • Posts: 1

Post 3+ Months Ago

Hi,

Hopefully somebody can help me? I am FTP-ing onto an Apache server and was wondering how to Chmod some .php files. I am quite new to this and am very lost!

Anybody know how?

Cheers
Hurley
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

While FTP is open and connected to your domain, right click the file you need to CHMOD and select the CHMOD option. Change it to whatever the instructions tell you to.

If your FTP client doesn't do this, it's time to find another one! *lol That's as easy as it gets.
  • fional24
  • Graduate
  • Graduate
  • fional24
  • Posts: 125
  • Loc: Scotland

Post 3+ Months Ago

WS_FTP LE is a good free package to use for this
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

Note:

it may not be called CHMOD in your ftp client
it could be "permissions" or "file attributes" and possibly others as well.

Also decoding the numbers can be confusing for a newby
The first number is for the permissions that apply to the "owner" of the file.
The second number is the permissions that apply to the "group" that the file belongs to, a group is a collection of users.
The third number is permissions that apply to everybody else.
There is another number but generally its ignored and is usually zero
e.g. in the number 0777 we are only interested in the 777 the zero can be safely ignored.

The three numbers are further broken down into what they represent
So the first number 7 means the owner has the permissions 1 + 2 + 4 = 7
1 means the owner can "execute" or run the file
2 means the owner can write to the file(change its contents)
4 means the owner can read the file

the same applies to the other 2 numbers

so if you want the owner to have full permissions he gets a 7
if you want the group to have execute and read permissions he gets a 5 etc...

lastly when displayed in an ftp client (at least the ones I have seen) they are shown in the format -rwxrwxrwx
the first '-' is the ignored value (it can be used to change the current owner)
r = read
w=write
x=execute
and order from right to left "user", "group", "everybody else"

I hope this helps
  • dilletante
  • Newbie
  • Newbie
  • dilletante
  • Posts: 5

Post 3+ Months Ago

One way is, if you have access to the control panel for this site, there will certainly be a facility to do that. Sometimes it's as simple as clicking on the permissions, which will then allow you (or prompt you) for the new permissions.

Other than that...hmm...I think there is a piece of shareware called SmartFTP that may allow you to do it.
  • stevegmag
  • Novice
  • Novice
  • User avatar
  • Posts: 29
  • Loc: Washington DC

Post 3+ Months Ago

is there a way to attach a file? I have a chmod calc all built so you don't have to remember all that stuff that Managedlinks posted (although that is great info)... I don't have a big enough brain hard drive to store things I can get a computer to do for me :D


if not I guess I can just port the code here for y'all to copy/paste.
[/code]
  • stevegmag
  • Novice
  • Novice
  • User avatar
  • Posts: 29
  • Loc: Washington DC

Post 3+ Months Ago

ok.. I saw someone post some long-@$$ code example, so here goes (let me know if I should not do this in the future :oops: )

Code: [ Select ]
<html>
<head>
 <title>CHMOD Calculator</title>
<!-- feel free to liberate this code, just leave this comment and meta tag in please --> 
<!-- author: Steven Gallagher -->
<meta name="author" content="Steven Gallagher">
<script language="javascript">
// Calculator Script
// Variables
var box;
var a;
var b;

// Function
function calc(box, user, number) {
 if ((eval('document.chmod.'+box).checked) == true) {
       // Owner
      if (user == 'owner') {
         val = parseInt(document.chmod.t_owner.value);
           val += number;
        document.chmod.t_owner.value = val;
  }
  // Group
  if (user == 'group') {
   val = parseInt(document.chmod.t_group.value);
     val += number;
     document.chmod.t_group.value = val;
  }
  // Other
  if (user == 'other') {
   val = parseInt(document.chmod.t_other.value);
     val += number;
     document.chmod.t_other.value = val;
  }
 }

 if ((eval('document.chmod.'+box).checked) == false) {
  // Owner
  if (user == 'owner') {
         val = parseInt(document.chmod.t_owner.value);
           val -= number;
        document.chmod.t_owner.value = val;
  }
  // Group
  if (user == 'group') {
   val = parseInt(document.chmod.t_group.value);
     val -= number;
     document.chmod.t_group.value = val;
  }
  // Other
  if (user == 'other') {
   val = parseInt(document.chmod.t_other.value);
    val -= number;
    document.chmod.t_other.value = val;
  }
 }
}
</script>
</head>
<body>
<form name="chmod">
 <table bgcolor="#000000" cellpadding="5" cellspacing="1">
  <tr bgcolor="#ffffff">
   <td colspan="4"><font face="verdana" size="3"><center><b>CHMOD Calculator</b></center></font></td>
  </tr>
  <tr bgcolor="#ffffff" align="center">
   <td><font face="verdana" size="-1"><b>Permission</b></font></td>
   <td><font face="verdana" size="-1"><b>Owner</b></font></td>
   <td><font face="verdana" size="-1"><b>Group</b></font></td>
   <td><font face="verdana" size="-1"><b>Other</b></font></td>
  </tr>
  <tr bgcolor="#ffffff" align="center">
   <td><font face="verdana" size="-1"><b>Read</b></font></td>
   <td><input type="checkbox" name="owner4" value="4" onclick="calc('owner4','owner', 4)"></td>
   <td><input type="checkbox" name="group4" value="4" onclick="calc('group4', 'group', 4)"></td>
   <td><input type="checkbox" name="other4" value="4" onclick="calc('other4', 'other', 4)"></td>
  </tr>
  <tr bgcolor="#ffffff" align="center">
   <td><font face="verdana" size="-1"><b>Write</b></font></td>
   <td><input type="checkbox" name="owner2" value="2" onclick="calc('owner2','owner', 2)"></td>
   <td><input type="checkbox" name="group2" value="2" onclick="calc('group2', 'group', 2)"></td>
   <td><input type="checkbox" name="other2" value="2" onclick="calc('other2', 'other', 2)"></td>
  </tr>
  <tr bgcolor="#ffffff" align="center">
   <td><font face="verdana" size="-1"><b>Execute</b></font></td>
   <td><input type="checkbox" name="owner1" value="1" onclick="calc('owner1','owner', 1)"></td>
   <td><input type="checkbox" name="group1" value="1" onclick="calc('group1', 'group', 1)"></td>
   <td><input type="checkbox" name="other1" value="1" onclick="calc('other1', 'other', 1)"></td>
  </tr>
  <tr bgcolor="#ffffff" align="center">
   <td><font face="verdana" size="-1"><b>Value</b></font></td>
   <td><input type="text" name="t_owner" value=0 size="1" readonly onFocus="this.blur()"></td>
   <td><input type="text" name="t_group" value=0 size="1" readonly onFocus="this.blur()"></td>
   <td><input type="text" name="t_other" value=0 size="1" readonly onFocus="this.blur()"></td>
  </tr>
 </table>
</form>
</body>
</html>
  1. <html>
  2. <head>
  3.  <title>CHMOD Calculator</title>
  4. <!-- feel free to liberate this code, just leave this comment and meta tag in please --> 
  5. <!-- author: Steven Gallagher -->
  6. <meta name="author" content="Steven Gallagher">
  7. <script language="javascript">
  8. // Calculator Script
  9. // Variables
  10. var box;
  11. var a;
  12. var b;
  13. // Function
  14. function calc(box, user, number) {
  15.  if ((eval('document.chmod.'+box).checked) == true) {
  16.        // Owner
  17.       if (user == 'owner') {
  18.          val = parseInt(document.chmod.t_owner.value);
  19.            val += number;
  20.         document.chmod.t_owner.value = val;
  21.   }
  22.   // Group
  23.   if (user == 'group') {
  24.    val = parseInt(document.chmod.t_group.value);
  25.      val += number;
  26.      document.chmod.t_group.value = val;
  27.   }
  28.   // Other
  29.   if (user == 'other') {
  30.    val = parseInt(document.chmod.t_other.value);
  31.      val += number;
  32.      document.chmod.t_other.value = val;
  33.   }
  34.  }
  35.  if ((eval('document.chmod.'+box).checked) == false) {
  36.   // Owner
  37.   if (user == 'owner') {
  38.          val = parseInt(document.chmod.t_owner.value);
  39.            val -= number;
  40.         document.chmod.t_owner.value = val;
  41.   }
  42.   // Group
  43.   if (user == 'group') {
  44.    val = parseInt(document.chmod.t_group.value);
  45.      val -= number;
  46.      document.chmod.t_group.value = val;
  47.   }
  48.   // Other
  49.   if (user == 'other') {
  50.    val = parseInt(document.chmod.t_other.value);
  51.     val -= number;
  52.     document.chmod.t_other.value = val;
  53.   }
  54.  }
  55. }
  56. </script>
  57. </head>
  58. <body>
  59. <form name="chmod">
  60.  <table bgcolor="#000000" cellpadding="5" cellspacing="1">
  61.   <tr bgcolor="#ffffff">
  62.    <td colspan="4"><font face="verdana" size="3"><center><b>CHMOD Calculator</b></center></font></td>
  63.   </tr>
  64.   <tr bgcolor="#ffffff" align="center">
  65.    <td><font face="verdana" size="-1"><b>Permission</b></font></td>
  66.    <td><font face="verdana" size="-1"><b>Owner</b></font></td>
  67.    <td><font face="verdana" size="-1"><b>Group</b></font></td>
  68.    <td><font face="verdana" size="-1"><b>Other</b></font></td>
  69.   </tr>
  70.   <tr bgcolor="#ffffff" align="center">
  71.    <td><font face="verdana" size="-1"><b>Read</b></font></td>
  72.    <td><input type="checkbox" name="owner4" value="4" onclick="calc('owner4','owner', 4)"></td>
  73.    <td><input type="checkbox" name="group4" value="4" onclick="calc('group4', 'group', 4)"></td>
  74.    <td><input type="checkbox" name="other4" value="4" onclick="calc('other4', 'other', 4)"></td>
  75.   </tr>
  76.   <tr bgcolor="#ffffff" align="center">
  77.    <td><font face="verdana" size="-1"><b>Write</b></font></td>
  78.    <td><input type="checkbox" name="owner2" value="2" onclick="calc('owner2','owner', 2)"></td>
  79.    <td><input type="checkbox" name="group2" value="2" onclick="calc('group2', 'group', 2)"></td>
  80.    <td><input type="checkbox" name="other2" value="2" onclick="calc('other2', 'other', 2)"></td>
  81.   </tr>
  82.   <tr bgcolor="#ffffff" align="center">
  83.    <td><font face="verdana" size="-1"><b>Execute</b></font></td>
  84.    <td><input type="checkbox" name="owner1" value="1" onclick="calc('owner1','owner', 1)"></td>
  85.    <td><input type="checkbox" name="group1" value="1" onclick="calc('group1', 'group', 1)"></td>
  86.    <td><input type="checkbox" name="other1" value="1" onclick="calc('other1', 'other', 1)"></td>
  87.   </tr>
  88.   <tr bgcolor="#ffffff" align="center">
  89.    <td><font face="verdana" size="-1"><b>Value</b></font></td>
  90.    <td><input type="text" name="t_owner" value=0 size="1" readonly onFocus="this.blur()"></td>
  91.    <td><input type="text" name="t_group" value=0 size="1" readonly onFocus="this.blur()"></td>
  92.    <td><input type="text" name="t_other" value=0 size="1" readonly onFocus="this.blur()"></td>
  93.   </tr>
  94.  </table>
  95. </form>
  96. </body>
  97. </html>
  • Tannu4u
  • Proficient
  • Proficient
  • User avatar
  • Posts: 480
  • Loc: India

Post 3+ Months Ago

yes i think that Managedlinks has give a great information about the permission on the file and there meaning.Thanks Managedlinks it was great on ur part to do this.I think the suggestions from the other persons are very helpful and u shouls get a new ftp client that provides u with the facility u want to u.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 60 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.