Samba missions

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
Hi all,

Me again. I'm having endless issues with this ubuntu box I installed, first the issue with the SSH (but that was the router) and now I'm having samba permission issues. I've created a folder on the the server for the users to share their work and they are able to read the folders fine, but cannot create or delete anything (i.e no write permissions).

I've created the share with these details in smb.conf (and tried MANY different configurations all with the same result):

[work_share]

comment = Work Folder
path = /media/store01/work_share
#browseable = yes
#read only = no
writeable = yes
create mask = 0777
directory mask = 0777
valid users = @staff
force group = staff

This is the latest configuration i've tried, still no luck. I have authentication enabled and the users and smbpasswd's are created and are identical. Here is a listing of the files on the client's share (mac) and some commands I tried:

James-iMac:share james$ ls -l
total 2
-rwxrwxr-x 1 james staff 0 Feb 16 01:38 test2.txt
-r--r--r-- 1 james staff 37 Feb 16 02:59 test3.txt
-r--r--r-- 1 james staff 0 Feb 16 02:55 test4.txt
-r--r--r-- 1 james staff 0 Feb 16 02:58 test5.txt
-r--r--r-- 1 james staff 0 Feb 16 12:54 test6.txt
James-iMac:share james$ touch test7.txt
touch: test7.txt: Permission denied
James-iMac:share james$ rm test2.txt
rm: test2.txt: Read-only file system

As you see user "james" should be able to delete the file test2.txt, but gives me "Read-only file system" even though I've specified that it's not read only in the smb.conf file.

Here is confirmation that james is in the staff group:

wadmin@work-server:/media/store01$ sudo lid -g staff
jamesmentz(uid=1001)

Here are the folder permissions on the storage drive of the server:

wadmin@work-server:/media/store01$ ls -l
total 108
drwxrwxr-x 2 root staff 16384 2010-02-03 14:54 lost+found
drwxrwxr-x 2113 root staff 81920 2010-02-15 11:55 music_share
drwxrwxr-x 2 root staff 4096 2010-02-16 12:54 work_share
drwxrwxr-x 5 root staff 4096 2010-02-11 09:23 usr_backup

As you see the group "staff" should have full access to work_share. I've tried setting permissions to 777 as well, but no change.

If anybody has some insights in to why I'm having this problem, I would eternally in your debt!
 

Nod

Honorary Master
Joined
Jul 22, 2005
Messages
10,057
Can't help, but may I point you to http://samba.org ? Look at the documentation section, it might have something you could use.
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
Hi Tim

On the machine that has the shared file - navigate to the shared folder, right click it and go to permissions. Under permissions drop down the lists and put them all on users can delete and read (or something similar), then right at the bottom click on apply to all files and folders. As soon as you click it appears nothing has happened but it does indeed change the permissions for you. Try it out, should be cool after that!
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
If that fails you may need super user permissions to do the permissions = $ sudo nautilus (will give you an explorer with sudo rights), then just follow the same procedure as above.
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
Thanks happy, but I tried that:

I've tried setting permissions to 777 as well, but no change.

I did find out now that I was on the wrong work group, however it didn't make any difference once I changed it.
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
You may have to do this every time you drop new files into the share, samba is kinda weird that way, it's highly annoying but I have'nt found a way to make it stick yet! :eek:
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
Which flavour of Linux are you using? 9.10 and samba seem to work much better than the previous releases.
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
The problem is I can't create new files on the share (I can from the server, but get Access denied on the client side).
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
Thanks happy, but I tried that:



I did find out now that I was on the wrong work group, however it didn't make any difference once I changed it.

You may need to restart the networking service to make it work?
$ sudo /etc/init.d/networking stop

then

sudo /etc/init.d/networking start
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
Okay, my options are running thin here. I have just removed all authentication added guest access with full r/w permissions, set the permissions for the entire disk for full access and still the same result!! Is this a mac thing, because I had absolutely no issues when I set up a file server for windows clients??
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
mmmm, when you say a mac thing do you mean the current clients are macs or that you've loaded ubuntu server onto a mac? In either case you may need to install ntfs3g on both sides.
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
Just for interest sake, can you log into james' account and give me the output of the groups command?
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
mmmm, when you say a mac thing do you mean the current clients are macs or that you've loaded ubuntu server onto a mac? In either case you may need to install ntfs3g on both sides.

Clients are macs. Ubuntu machine is normal PC. I'm not using ntfs partitions, they are all ext3 - so I doubt installing ntfs3g will help much. Its just so strange that everything seems fine, except as soon as I try and write to the folder it tells me its read only.
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
Just for interest sake, can you log into james' account and give me the output of the groups command?

On the server or the client? I've removed all the user accounts from the server now because I wanted to start from the bottom to try and see where the problem lies.
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
Did you check out that first link from techrepublic?

Also, are you using the server with gui? My first suggestion of going to shared folder on the server and messing with the permissions should help!

Look in synaptic for samba or gsamba, I know there is a package in there that can also tweak samba permissions I just can't remember exactly what it's called!

Sorry Tim, I'm clueless with macs so I'm not sure what you need to 'fiddle' with, or if it's solely a samba problem!
 

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
23,995
Thanks for the all the input. And yes, the problem seems to lie on the side of the Mac as this isn't the first time I've done this (the first time with Macs though). I'm going to try as many things as possible and may have to go NFS route if I can't get this sorted.
 

Happy Camper

Expert Member
Joined
Jul 21, 2009
Messages
1,510
Thanks for the all the input. And yes, the problem seems to lie on the side of the Mac as this isn't the first time I've done this (the first time with Macs though). I'm going to try as many things as possible and may have to go NFS route if I can't get this sorted.

Test the share on a fat32 or ntfs external drive? After having installed ntfs3g on both server and clients?
 

Nod

Honorary Master
Joined
Jul 22, 2005
Messages
10,057
Thanks for the all the input. And yes, the problem seems to lie on the side of the Mac as this isn't the first time I've done this (the first time with Macs though). I'm going to try as many things as possible and may have to go NFS route if I can't get this sorted.

Going with NFS might be the easiest. You could even try iscsi as another option.
 
Top