[plug] chown and chmod questions.
Jonathan Young
jonathan at pcphix.com
Thu Jan 11 11:13:11 WST 2007
Some quick answers to help get you going. I am sure others will add
to/correct me, but I noticed you hadn't had any replies yet... So here
goes:
On 1/11/2007, "Lee Jamieson" <leejam at gmail.com> wrote:
>and now all the files and folders I copied are set as root access.
Normal when copying or moving as root.
>I'm just checking that this command will change the folder and files
>recursively,
>
>"chown --recursive <username>:<group of user> <directory>"
>
>Do I put lee:lee as the username and group?
Should work. I personally use -R instead (just fewer keystrokes) and
often you can use a group such as lee:administrators or similar, but
what you have is OK.
>That should change the ownership and the permissions need a different command
>
>"chmod --recursive u+rw <directory>"
Again, I use chmod with -R on the end. I also tend to use 755 775 etc
instead of the alphabet equivalents. Use man chmod to check you are
correct, but again, seems OK and you can always change 'em again later!
>Any preference as to which is done first?
Makes no difference. If you chmod before chown or chown before chmod,
you simply won't get the "full effect" until you've done both.
>I'd rather ask first and make sure I'm doing it right before stuffing
>something up.
If it was my PC and data, based on what you've written above, I'd say
do it.
Good luck.
- Jonathan
More information about the plug
mailing list