can I chown to anyone on the system?
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?
|
If you have admin (root) privileges, you can change anything and everything.
|
Good. Then what's the syntax for "anyone" when chowning?
|
man chown & man sudo.
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. |
Quote:
chown changes ownership. chmod changes permissions (for owner, group, and "anyone"). Let me give you an example: Code:
school:~# ls -l Code:
d <- bit telling us this is a 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 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: Code:
mkdir dir1 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. chmod - chown |
So - You're telling me that an admin can simply chown any of the "restricted" files on my home folder and view them?
Seriously ??? Linux Archive |
Quote:
-C |
Quote:
|
Quote:
|
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 best rregards[]'s |
Quote:
|
Quote:
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...... No, you should not get upset......;) |
:) 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. |
mod != expert
many posts != expert 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. |
Quote:
|
All times are GMT -5. The time now is 08:58 PM. |