Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

Try sudo chmod -R 777 <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.

share|improve this answer
    
Recursively allowing execute permission might not be the best idea. –  hbdgaf Mar 17 '12 at 6:12
    
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 '12 at 5:05

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.

share|improve this answer
    
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 '12 at 5:06

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.

share|improve this answer

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

http://www.webmin.com

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Mitch Aug 23 '12 at 19:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.