I keep coming back to this.
How do I check what 'Permissions' are on a Folder
Folders in Linux are called directories.
The Linux shell command
ls -l is your friend.
The first ten characters of each line from
ls -l contain the file type and the permissions.
After the file type, the next nine characters are grouped in threes. These characters are the (r)ead, (w)rite and e(x)ecute perms for the user, the group and the world.
Here's an example..
$ ls -l
total 0
drwx------ 2 asbokid users 40 May 8 01:31 dir1
drwxr-xr-x 2 asbokid asbokid 40 May 8 01:31 dir2
drwxrwxrwx 2 asbokid games 40 May 8 01:31 dir3
drw-r-x-w- 2 asbokid staff 40 May 8 01:31 dir4
-rw------- 1 asbokid root 0 May 8 01:52 file
$
The directory called dir1 is owned by asbokid, and is in the users group; dir2 is owned by asbokid and is in the asbokid group; dir3 is owned by asbokid and is in the games group, etc..
And dir1 has user perms of rwx = 4 + 2 + 1 = 7, group perms of --- = 0 + 0 + 0 = 0, world perms of --- = 0 + 0 + 0 = 0 i.e. 700
And dir2 has user perms of rwx = 4 + 2 + 1 = 7, group perms of r-x = 4 + 0 + 1 = 5, world perms of r-x = 4 + 0 + 1 = 5 i.e. 755
..
And file has user perms of rwx = 4 + 2 + 0 = 6, group perms of --- = 0 + 0 + 0 = 0, world perms of --- = 0 + 0 + 0 = 0 i.e. 600
How do I check what 'Permissions' are on a File ?.
As above. Wikipedia has a pretty good entry on the shell command
ls explaining all this..
I think the folder should be 700 and the file 600 .
chmod 700 directoryname
chmod 600 filename
cheers, a