samba share permissions <SOLVED>

Questions about cabled networking
Forum rules
Before you post please read how to get help

samba share permissions <SOLVED>

Postby taifunx on Mon Jan 28, 2013 2:09 pm

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 taifunx on Sat Feb 16, 2013 4:55 am, edited 1 time in total.
taifunx
Level 1
Level 1
 
Posts: 2
Joined: Sun Jan 27, 2013 12:28 pm

Linux Mint is funded by ads and donations.
 

Re: samba share permissions

Postby altair4 on Mon Jan 28, 2013 2:49 pm

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.
altair4
Level 16
Level 16
 
Posts: 6219
Joined: Tue Feb 03, 2009 10:27 am

Re: samba share permissions

Postby taifunx on Mon Jan 28, 2013 3:09 pm

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!
taifunx
Level 1
Level 1
 
Posts: 2
Joined: Sun Jan 27, 2013 12:28 pm

Re: samba share permissions

Postby altair4 on Mon Jan 28, 2013 3:52 pm

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.
altair4
Level 16
Level 16
 
Posts: 6219
Joined: Tue Feb 03, 2009 10:27 am


Return to Ethernet

Who is online

Users browsing this forum: No registered users and 1 guest