6

It doesn't seem that many others have had this problem so I thought I'd ask here.

Have a server running Ubuntu with 1 internal and 1 external drive. Have a folder shared with samba on the internal drive that can be accessed, however, when sharing the entire external or just a folder on it I get the "You do not have permission to access" error on the Windows clients.

When sharing on Ubuntu I go to properties, share and then tick share, allow others to write as well as guest access. Clicking create share then says it will have to set the permissions and I let it. It's not accessible. When trying to set permissions manually in the Permissions tab it doesn't let me choose anything, when choosing Read and Write for "other" users it reverts back to nothing as soon as it's chosen.

I've tried creating a symlink from the mount point to within the home directory and sharing that, even getting chmod to change the permissions so they're viewable in ls -la, but it still isn't accessible. Is there something really simple I'm missing here like externals not being easily shared? Thinking I might have to crack it open and stuff it inside the server. Oh and the external is NTFS, if that would make a difference.

4 Answers 4

5

Try sudo chmod -R 755 <path of external drive> and see if that fixes the permissions error. (Warning, this will give everyone read-write-execute access to everything on the drive).

If that doesn't work...

Make sure the external has a real mountpoint like /external or /shared-stuff.

If it is mounted to the temporary location (which is default behavior), samba might be looking at an old temporary location, get a read error, which is passes on as a permissions error to the windows client.

If that doesn't work, it is probably because the drive is ntfs. NTFS permissions are stored in a way that don't make sense to linux, and probably not to samba either. It would be good to use a native linux format, but that requires moving the data off and reformatting the drive, and copying the data back.

2
  • 1
    Recursively allowing execute permission might not be the best idea. Mar 17, 2012 at 6:12
  • 1
    Looks like it was the NTFS, tried with a USB drive and then formatted it to ext4 and it worked perfectly. Am going to do that to the external now but will have to move everything off it first. Any recommendation on a filesystem for a fileserver serving Windows clients that isn't FAT32?
    – warwickp
    Mar 18, 2012 at 5:05
4

I agree with Owen on the NTFS guess. Here's how I got samba sharing to play nicely with anonymous shares completely from the gui(I've done it cli too with workarounds that were a pain). This way is easy I promise:

In Dash: Type Software Center
In the search box type "Samba" then install "Samba".

In Dash: Type Samba
Enter your password.

In the GUI that opens up choose "Preferences" menu -> "Server Settings" then the "Security" tab change the authentication mode to share and the guest account to your user name account.

Choose the "Add a Samba Share"; the green plus icon; browse to the directory you wish to share.

Place a check mark in "Writable" and "Visible".

Then on the "Access" tab choose "Allow access to everyone".

Press OK

Verified sharing an NTFS partition, anonymous, all access for me on 11.10 using only the gui. It also works with mountpoints in media.

Hope it helps.

I bolded the part that I think is goofing up on you.

Mostly from here.

1
  • Samba wasn't working for some reason, got it installed fine but whenever I tried opening the GUI it would flash there in the side bar for a couple of seconds then go away.
    – warwickp
    Mar 18, 2012 at 5:06
1

I had the same issue with NTFS permissions and a network share. Forcing my Ubuntu admin account as the user under the share settings through Webmin I was able to connect with no problem.

0

I suggest you to manage your shares through webmin interface. its's simple and easy to use.

http://www.webmin.com

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .