Forum
« chmod help please(solved) »

Welcome Guest. Please Login or Register.
May 24, 2013, 7:38am



Return to or visit the SalineOS webpage

Forum :: General :: New Linux User Questions :: chmod help please(solved)
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: chmod help please(solved) (Read 225 times)
ukbrian
Senior Member
****
member is offline





Joined: Aug 2011
Gender: Male
Posts: 285
 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
« Last Edit: Dec 30, 2011, 4:32pm by ukbrian »Link to Post - Back to Top  IP: Logged
petrek
Senior Member
****
member is offline

[avatar]



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:
chmod nnn pathtofile
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:
chmod 600 pathtofile
« Last Edit: Dec 30, 2011, 3:27pm by petrek »Link to Post - Back to Top  IP: Logged

Skallagrigg
ukbrian
Senior Member
****
member is offline





Joined: Aug 2011
Gender: Male
Posts: 285
 Re: chmod help please
« Reply #2 on Dec 30, 2011, 3:50pm »

Thank you, very much appreciated, love your art work :)
Link to Post - Back to Top  IP: Logged
petrek
Senior Member
****
member is offline

[avatar]



Joined: Aug 2011
Gender: Male
Posts: 386
Location: Poland
 Re: chmod help please(solved)
« Reply #3 on Dec 31, 2011, 1:42pm »

Thank you :) There is also other way for setting permissions, if you want add only executing bit for yourself you write:
Code:
chmod o+x pathtofile
Cheers and Happy New Year :)
Link to Post - Back to Top  IP: Logged

Skallagrigg
   [Search This Thread] [Share Topic] [Print]



Anthony Nordquist, on behalf of the SalineOS project, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. As such, if you click the above banner and then make any purchase including digital downloads, a small percentage will be paid to the SalineOS project.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile