LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File permissions in every element of the path or just the last one? (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-in-every-element-of-the-path-or-just-the-last-one-850958/)

stf92 12-17-2010 06:20 PM

File permissions in every element of the path or just the last one?
 
Kernel 2.6.21.5, slackware 12.0

Hi:
For a given app run by me as user john to be able to create a file in /foo1/foo2/, what do I need?

(a) john to have write permissions in /foo1/?
(b) john to have write permissions in /foo1/foo2/?
(c) john to have write permissions in both /foo1/ and /foo1/foo2/? Any hint will be welcome.

Note: No. It's not homework. KTorrent complains when trying to create the files being downloaded, saying 'permission denied'. But I think he is being run by another user. Well... I can explain in a different thread.

GazL 12-17-2010 06:26 PM

read+execute (well, technically just execute, but that's uncommon) for directory foo1/ and read+write+execute on foo2/

stf92 12-17-2010 07:03 PM

Thank you for your instructive reply, GazL. I have just discovered what happens. All dirs in the path are owned by root. It's a vfat (FAT32) file system. I put dmask=000 in fstab but must surely do something else so the o.s. thinks the regular user is the owner. Or enter the GUI (it's there I was working in) as root.

stf92 12-18-2010 04:16 AM

I added uid=xxx,gid=yyy in fstab and all went well. The O.S. now thinks the fat partition has owner/group information.


All times are GMT -5. The time now is 04:49 AM.