samba share permissions <SOLVED>

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
taifunx

samba share permissions <SOLVED>

Post by taifunx »

Hi all,

I'm quite new to Linux - half a year ago a made it to linux mint 14, 64bit (mate).
So far I'm quite settled but there is one thing which bothers me for quite a while now.

I did setup an additional linux-machine - samba-fileserver which is accessible within my homenetwork. On this machine there is a samba-share acitvated and user is rudi which has read and write access to this share.
So getting to my problem: I did a permanent link within fstab to access this share from my other linux machine (64bit -desribed above):
//192.168.0.200/Daten /media/Daten cifs user=rudi,password=geheim,rw,iocharset=utf8,codepage=850,user 0 0

this share is now permant at startup and I can access all files. The only problem is that I only can read files on the samba-share although user "rudi" is the owner of the share (on the file server).
Also once I connect directly to this share with username = rudi and password I can access files for writing and reading.

Permanent mount in fstab is working but only with read access - how can I get permanent mounted share for reading and writing for rudi?
here is what I can see once this share (Daten) is mounted:
drwsr-xr-x 5 user root 0 Jan 28 18:40 Daten
it belongs to user, group root - but only user has read write access and now ... ?? Somehow I think I have some misunderstanding how to control this samba share for writing as well...

I'm new to this forum so I apologize for not having supported all necessary information.

I also played around with the sticky bit ... but I think that's too tough for me to handle...

Greetings and thanks alot
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: samba share permissions

Post by altair4 »

The user and password in the fstab statement are credentials required for access to the share so try to take posession of the mounted share in your client by changing the fstab expression to this:
//192.168.0.200/Daten /media/Daten cifs user=rudi,password=geheim,rw,iocharset=utf8,codepage=850,uid=1000,nounix 0 0
EDIT: Would you believe it I misspelled unix :oops:

Or just let Gigolo automount it for you.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
taifunx

Re: samba share permissions

Post by taifunx »

misspelling unix isn't a big deal at all..
Man, it works great.
Just to get it straight: what is the meaning of uid=1000,nounix?
Why is it me then being the owner?
And: do I get it right the sticky bit isn't necessary for that is it?

Anyway thanks a lot!
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: samba share permissions

Post by altair4 »

The syntax of a cifs mount is sort of a wierd hybrid between a typical mount of a linux filesystem and a mount of an NTFS filesystem. Just like an ntfs partition a cifs mount creates a "view" of the remote share. You either need to specify the owner of the mount with a uid ( just like an ntfs mount ) or define the permissions of the mount with a dir_mode and file_mode - something like dir_mode=0777,file_mode=0666 to make it accessible to everyone. In this case it's the opposite of using a umask for an ntfs partition so I guess my analogy falls apart here but .... nounix is used to turn off any interaction between the mounted share on the client and the share so that the mount options prevail on the client side.

It's for reasons like this that after years of using the traditional classic mount I now use Gigolo to automount. :wink: Of course you have to deal with the weird mount point it automatically creates but in a typical home situation where things are more peer-to-peer it really doesn't matter to me.

The sticky bit on the server's shared folder can be useful if you want to prevent one user from removing files owned by someone else in the LAN.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”