ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 284
|  | chmod help please(solved) « Thread Started on Dec 30, 2011, 1:46pm » | |
Twice now I have ended up with my USB being taken over by root(permissions etc)
Could some kind person out with a step by step guide to using chmod in the terminal to make the permissions normal again.
I have tried RTFM with the man pages and google but I'm to old and thick to understand them.
I will add another node to the linux syntax section of CherryPad so I wont bother you again. I'm a cut/paste merchant really
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: chmod help please « Reply #1 on Dec 30, 2011, 3:15pm » | |
If you want to set ownership of files you use chown and chgrp. For example, if your USB is mounted under /mnt/usb and your username is ukbrian you run:
Code:| chown -R ukbrian /mnt/usb |
|
Code:| chgrp -R ukbrian /mnt/usb |
|
This will set you as owner(and your group) of every file on this usb.
Setting permisions looks like this:
Code: where n is a number from 0 to 7. First n is for owner of file, second n is for his group, and third is for everybody else. 1 is for executing, 2 is for writing, and 4 is for reading. For example if you want to set reading and writing for owner of file only, you just add two numbers for it, so it will be 2+4=6 and put it on the first place
Code:
|
Skallagrigg |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 284
|  | Re: chmod help please « Reply #2 on Dec 30, 2011, 3:50pm » | |
Thank you, very much appreciated, love your art work
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
| |