Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Permissions for samba share

Got problems with your B2 or B3? Share and get helped!
Post Reply
gandi
Posts: 2
Joined: 09 Feb 2010, 18:40

Permissions for samba share

Post by gandi »

Hello,

I'd like to mount my Bubba|Two on my Laptop (which runs Ubuntu 9.10). This works fine, but when I copy files from the laptop to Bubba the file permissions are screwed up.

Here's the corresponding line in my /etc/fstab:

Code: Select all

//192.168.1.100/home /mnt/bubba cifs credentials=/home/gandi/.smbcredentials,uid=gandi,gid=gandi 0 0
The user 'gandi' exists on both laptop and Bubba.

When I copy a simple text file from my laptop to Bubba, via

Code: Select all

cp -a file.txt /mnt/bubba/gandi/
for some reason its permissions are changed from -rw-r--r-- to -rwxrwxrwx.

Any help / suggestions how I can keep the correct permissions are appreciated!
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Permissions for samba share

Post by RandomUsername »

I had a similar problem.

Have a look here http://forum.excito.net/viewtopic.php?f ... 98&start=0

Basically, try adding wither "nodfs" or "nounix" to your fstab line. The first one worked for me.

[EDIT]Also, I no longer mount my shares with fstab. Instead I use this method - http://ubuntuforums.org/showthread.php?t=1186877
It has the advantage that your credentials are encrypted with the Gnome keyring.
gandi
Posts: 2
Joined: 09 Feb 2010, 18:40

Re: Permissions for samba share

Post by gandi »

RandomUsername wrote:I had a similar problem.
Basically, try adding wither "nodfs" or "nounix" to your fstab line. The first one worked for me.
Thanks, 'nodfs' worked for me too! At least my own user permissions are kept now, not necessarily the group permissions though. A

Code: Select all

cp -a <source-file> /mnt/bubba/gandi/
still gives me a 'permission denied'. Could that be related to the fact that my bubba user has another primary group?
RandomUsername wrote: [EDIT]Also, I no longer mount my shares with fstab. Instead I use this method - http://ubuntuforums.org/showthread.php?t=1186877
It has the advantage that your credentials are encrypted with the Gnome keyring.
This doesn't seem to keep the permissions intact though.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Permissions for samba share

Post by RandomUsername »

Permissions for samba shares are controlled by /etc/samba/smb.conf. You'll probably need to make some adjustments to that.

I pasted mine here: http://forum.excito.net/viewtopic.php?f ... rt=0#p9394

The man page for smb.conf is very extensive. You should be able to tweak it to your satisfaction.
Post Reply