change permitions in user home
Leonard Bussey
lbus42 at gmail.com
Mon Aug 11 22:22:41 UTC 2008
On Mon, 2008-08-11 at 12:37 -0400, Doug Pollard wrote:
> I need to change permissions on some of my user files. I have the
> command but i need to know how to apply it to an individual file. Do I
> click on the file and then put in the command. That dosn't seem to
> work. Been reading all morning can find ways to change all the files
> but not to single out an individual file. I have files that everybody
> can write to ,read and exicute and I want to change just those files so
> that I as the owner of them can write to them.
> Thanks Doug
>
To change the permission of a single file, like "myfile.doc", from a
terminal window, type
sudo chmod 755 myfile.doc
Here is what the numbers represent
7 is for the owners group, 5 is for group, and 5 is also for others
The numbers are a binary total as follows, where read, write, and
execute represent 3 binary bits and can be either on or off.
4 2 1
Read Write Execute
Group X X X
So if you wanted to give the others just read & write permissions, you
would add 4 and 2 to give you a permission of 6.
4 2 1
Read Write Execute
X X 0
If you wanted to give the others just read permission, the permission
would just be 4
4 2 1
Read Write Execute
X 0 0
If you wanted to give just read and execute, you would add 4 for the
read bit and 1 for the execute bit to get a total of 5.
So in the above example I gave
sudo chmod 755 myfile.doc
7 would enable the owner to read, write, and execute
and the group and others to only read & execute
Hope this clarifies this for you. Feel free to email me if you need
more information.
More information about the ubuntu-users
mailing list