chmod 000 for a folder in Ubuntu 13.10
There is a manual page for
Basically, look at this table on that page:
You can change the tick boxes, so that different people have different permissions.
Owner is the permissions on that file of the owner of the folder - usually the user that has created them - can be changed with
Group is the permissions on that file of the group of the folder - can be changed with the
chown or the
Other is the permissions on that file of everyone who does not fall into the above two categories.
chmod 600 /PATH/TO/FILE will change the permissions so that only the owner can read the file, and write to it.
You can also do the same for folders, but by using
chmod -R 600 /PATH/TO/FILE so the contents of the folder is the same as well.
The thing is, if you try entering it as 000:
Then no one can access or write to the file, except root, and the owner if they change the permissions again. This can work, but there is not much point to it as:
- Anyone who is logged in as the owner could remove the file.
- They could change the permissions back again, either by
chmod, or by & Properties
- If they are not the owner of the file, you do not need to
chmod 000 .., just use
chmod 600 ..
So if you want to stop people accessing the file, encrypting the file with a password would be the better idea. So to stop people accessing a file or folder, open Archive Manager, and click New - create one that you can encrypt (under Other Options) - I use .7z, as then you can encrypt the file list to. Then type the password you want to use.
Then you can add files:
Then you have an encrypted archive with your files secure inside - though it can still be deleted...
But I am able to do this in my SLES Box
user@DemoBox:/export/home/n/user : ls -l test ls: cannot access test: No such file or directory user@DemoBox:/export/home/n/user : mkdir test user@DemoBox:/export/home/n/user : ls -ld $_ drwx------ 2 user EDC_EOO_OS 6 Dec 10 04:35 test user@DemoBox:/export/home/n/user : chmod 0000 $_ user@DemoBox:/export/home/n/user : ls -ld $_ d--------- 2 user EDC_EOO_OS 6 Dec 10 04:35 test user@DemoBox:/export/home/n/user : lsb_release -a LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch Distributor ID: SUSE LINUX Description: SUSE Linux Enterprise Server 11 (x86_64) Release: 11 Codename: n/a