Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just had to chown my backup hard drive to my account. No problem with that, but I just wondered something. This is academic, because I'm the only user; but if there were others or if I had more than one account (notwithstanding that I have no idea why I would), could I chown to "anyone," whatever the syntax might be?
Last edited by newbiesforever; 01-22-2009 at 10:30 PM.
If you want to allow everyone to have access, then use chmod to enable "o" (others) access. If all users are a member of a group such as "users", then you could change the group ownership of the file.
I just had to chown my backup hard drive to my account. No problem with that, but I just wondered something. This is academic, because I'm the only user; but if there were others or if I had more than one account (notwithstanding that I have no idea why I would), could I chown to "anyone," whatever the syntax might be?
d <- bit telling us this is a directory
rwx <- Owner rights
r-x <- Group rights
--x <- Everyone elses rights
For directories (r) means list the contents of the directory
For directories (w) means modify contents of the directory or create new
For directories (x) means make the directory your working directory
For file1 we have...
Code:
- <- nothing special
rw- <- Owner rights
--- <- Group rights
r-- <- Everyone elses rights
For files (r) means you can read the contents of the file
For files (w) means you can change the file or delete it
For files (x) means you can tell the system to execute the file
If I was root and wanted to create those files like that here is what I would do:
I've always found numeric permissions easier to grasp and understand because they're simple addition: r=4, w=2, x=1. Add them up for each section... rwx=4+2+1=7 rx=4+1=5 x=1, rw=4+2=6 none=0 r=4. I think learning them this way in the long run makes it easier when you find a need to understand umask also. There are some special bits you can add too, like setuid, setgid, sticky bit (that's what the first 0 represents), but if you understand the basics its all much easier.
Any who I'll shut up now
If you need better examples or want to look at the alternate syntax using the non-numerical method, you can look at the wikipedia article for the two programs which explain them quite well in my opinion and even offer good examples.
So - You're telling me that an admin can simply chown any of the "restricted" files on my home folder and view them?
Seriously ???
It sounds like it's not your system, so you need to get into the mindset of using other people's property. The admin is god. He can view your files, delete them, copy them, and suspend or remove your access to the machine. Normally none of these things are done, as the admins have more important things to do than to peruse their users' files. But, it's important to keep this in mind when deciding whether to put personal files on your company's/school's computers.
root is the God on your system but you always can try to hide something from him, like using some tool like EncFS that Encryptate any folder giving you the power to own the only key to open them (some password of course not a real key), at the same time root may seem an strange concept its the most powerfull concept on a unix system.
talking about chown and chmod I would sticky with jschiwal, use man, dont make so simple questions, realy. We notice that you are very new to linux and you have to learn first to search for the answers on the net or in the man pages.
Man pages are simple tu use you just need to type in the console:
Code:
man SomeCommand
end you can go out from man pressing 'q'... or you follow this tip or you're going to find many rtfm (Read The Fu... full Manual) if you know what I mean
root is the God on your system but you always can try to hide something from him, like using some tool like EncFS that Encryptate any folder giving you the power to own the only key to open them (some password of course not a real key), at the same time root may seem an strange concept its the most powerfull concept on a unix system.
talking about chown and chmod I would sticky with jschiwal, use man, dont make so simple questions, realy. We notice that you are very new to linux and you have to learn first to search for the answers on the net or in the man pages.
Man pages are simple tu use you just need to type in the console:
Code:
man SomeCommand
end you can go out from man pressing 'q'... or you follow this tip or you're going to find many rtfm (Read The Fu... full Manual) if you know what I mean
best rregards[]'s
Begging your pardon, but I'm not new to Linux. What I am is a 5 1/2 year-user with a comprehension level of an advanced newbie.
Begging your pardon, but I'm not new to Linux. What I am is a 5 1/2 year-user with a comprehension level of an advanced newbie.
Me too.....
Yes, he was talking down to you.......
No, you are not the only person to suddenly realize that root can do anything---including reading, changing, and deleting all you data......
I wasn't upset.--I'm better at brushing off geek taunts than I used to be. Actually, I was well aware of the concept that root is God--that's newbie knowledge to me. My question was only about chowning.
And you can't mean you're an "advanced newbie," because how would you be a mod. Unless you were patronizing me, you must mean you've used Linux for 5 1/2 years. It seems impressive to have become an apparent expert in such a relatively short time.
Last edited by newbiesforever; 01-25-2009 at 12:20 PM.
Seriously, I think what I have learned in the last 3+ years at LQ is a bit about where to look for things. I really doubt that I would be employable in the IT industry---that I will leave to the folks ~ 1/3 my age.
I am also lucky to have learned some Unix and some programming before wandering down the Windows path for well over 5 years.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.