[LBo] File permissions
Troy
troythetechguy at gmail.com
Tue Jun 19 16:16:50 CEST 2007
On 6/17/07, Anita Lewis <a.lewis at linuxbasics.org> wrote:
Anita,
Thank you for taking your time to help me resolve this issue. If I
understand correctly, you were experiencing the same thing when you tried
copying files from your usb hard drive.
Also, I noticed that even when I set the umask to 002, when I copy
> something into the directory, it keeps the permissions it had. I think
> the umask only affects *created* files and not copied ones.
I checked on umask, and according to Wikpedia, umask affects newly created
files and directories, so you hit the nail on the head!
However, here is an easier way I think. Use the 'install' command
> rather than 'cp'. This command allows you to set group and permissions.
> See the manpage on it, but basically it is like this:
I tried moving some pictures from the compact flash to my hard drive this
morning using install, and it worked perfectly! Now all I need to do is
learn how to create a script that I can place on my wife's Desktop, and she
can launch the script by clicking on an icon. Is it possible to run scripts
by clicking an icon?
> This will give rw-rw-r-- on the files when they get there no matter what
> the permissions are in the destination. Since you already have the group
> suid set, you don't need to set the group as well, but that is also
> possible with 'install'.
Because everything now works, I'm afraid to change anything. However, for
my own knowledge, do I need to have the group permission set gid, or does
just having both my wife and I members of the same group allow us to have rw
access to the pictures?
Thanks again for the help.
Troy
More information about the QnA
mailing list