Must the Owner of a File Have Equal or Greater Permissions than the Group?

-1

Note: These results were altered to disguise the real names of these files and user names.

I'm editing the text file tablet.css over a Samba Share with the following permissions:

File Permissions on Server:

root@host:/# /srv/sites/onetwothree.domain/css# ls -l

-rw-rw---- 1 alice devteam 10KiB Dec  4 12:50 normal.css
-r--rw---- 1 alice devteam  5KiB Dec  3 12:10 tablet.css
-r--rw---- 1 alice devteam  4KiB Dec  3 12:15 phone.css

Directory (Folder) Permissions on Server:

dr-xrwx--- 2 alice devteam 4KiB Dec 15 15:09 css

I connect to the share via the user bob whom is a member of devteam.

Given my current understanding of file permissions, I should be able to have write access to the tablet.css file. But according to Samba's view, I don't...

Samba Client's View:

bob@host:/run/user/1000/gvfs/smb-share:server=Galileo,share=alice/sites/onetwothree.domain$ ls -l

-rwx------ 1 bob bob 10KiB Dec  4 12:50 normal.css
-r-x------ 1 bob bob  5KiB Dec  3 12:10 tablet.css
-r-x------ 1 bob bob  4KiB Dec  3 12:15 phone.css

Interestingly enough, although opening tablet.css with nano warns me about missing write permissions, Ctrl+O seems to works just fine; announcing it saved correctly. I can verify though that indeed on the server side that the changes were never written.

One of the workarounds I made was to simply give write permissions to the owner (as can be seen by normal.css ), and that fixes the issue. But what if I don't want to give the current owner those write permissions?

gate_engineer

Posted 2014-12-16T05:03:45.353

Reputation: 411

Answers

0

If your goal is to ensure the group devteam has the only write permissions to those files, then perhaps one of the members of devteam, in your case bob, should be the owner of those files instead of alice...

gate_engineer

Posted 2014-12-16T05:03:45.353

Reputation: 411