
A tough subject. A lot of you come with questions about file permissions. First off, let me explain that on a Unix system, file permissions are a lot more advanced than on your average Windows machine. Unix file permissions are built up out of three sets of information. Each set contains 3 file permissions.
Second set is the 'group' permissions. Every user (owner) on a Unix system also belongs to one (or more) groups. The group permissions are the same as the owner permissions, read, write and execute.
Third set is the 'other' permissions. The other permissions apply to anyone who is -not- the owner and -not- in the owners group. Here we also find the read, write and execute permissions.
Now, what do all those permissions mean? There are a few special cases:
For regular files:
For directories:
Going on the above, you can already see that permissions that are set too loosely might be dangerous. Here you have this script that needs a directory where it keeps it's data. Now, since we're the file owner, and the webserver (which is most likely in the 'other' group) has no access, how can you set these modes?
In most FTP programs there's a dialog that will let you check the read/write/execute permissions for all 3 sets. I'll have to refer you to your FTP program documentation for the dialog itself.
If you have a script, the usual file mode is described as '755'. 755 basically boils down to:
Most data directories are set to '777'. This boils down to the fact that -everyone- (all 3 sets) get read / write / execute permission. I hope this helps you with the file permissions!
|
|
||||||||
|
||||||||
|
||||||||