Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set permissions to a folder such that, when I'm normally logged in (meaning not as root), this folder isn't deletable, but I can still change the name of this folder and move in around in my system ?

IS this possible and if yes, how to set the permission ? I already tried different combinations for the permissions but couldn't figure out how to do it.

Also (side question), if some folder hast some permission set and I copy this folder, along with its contents (assuming I am allowed to read it) to a memory, are these permission preserved ? I suppose not, since under Windows I could delete the folder on the stick, even if under Ubuntu it isn't allowed to delete it...

share|improve this question
It could be a stick bit. please show the output of ls -lid /path-to-folder (this directory permission) – user61928 Oct 2 '12 at 10:36
@maythux Sorry for the late response. This is what it shows, as I have configured it now (every permission is "Acces only" for folders and "-" for files): 1319179 dr-xr-xr-x 2 user user 4096 2012-10-07 13:01 – user10324 Oct 7 '12 at 11:02
up vote 1 down vote accepted

As far as I can tell, the answer to your question is that this is not possible, at least not in the way you want it to work. However, let us dive into that problem and consider several issues.

First of all, notice that if you have at least one file in the directory, it will not be possible to remove it from the command line using the rmdir command. So that's something already.

Secondly, the permissions to rename the folder are not given by the permissions of the folder itself, but of the folders that contains it.

share|improve this answer

Right click on the Folder then click the properties Next click permission tab Here now you edit tour permission for the folder.

share|improve this answer

You could give ownership of a directory and it's contents to another user (e.g. in a terminal sudo chown root:root mydir), you can create files in such a directory completely owned by this other user (which makes it a bit more difficult to delete), but under nautilus you can still press the DELETE-key on a directory which simply moves it to Trash.

Concerning the copy question: permissions should be copied as well, but ownership however will not be copied.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.