View Full Version : [ubuntu] [SOLVED] "Access Denied" when writing to samba shares from applications

December 18th, 2008, 06:09 AM
I am hoping that someone can point me to some small, dumb thing I'm missing here. I find that I am mostly unable to write directly to a samba share I have setup from applications. However, if I access the share through Nautilus, I can write, delete, etc. with no problems.

For example, I would like to rip a couple CDs directly to the music directory on my network samba share. From Sound Juicer, I get the following error popup when I hit "Extract."

Sound Juicer could not extract this CD.
Reason: Could not open vfs file "file:///entertainment/music/Midnight_Oil_-_Diesel_and_Dust/.01._Midnight_Oil_-_Beds_Are_Burning.flac" for writing: Access denied.

But, and here's the part I REALLY don't get. If I wait 30 seconds or so, an empty folder with the right name shows up in the directory. Then, if I hit extract again, it rips without errors. Huh!? I like that it works, but this is a silly way to do things. Do I have a setting wrong somewhere?

The relevant line from /etc/fstab is:

//homeserver/entertainment /entertainment cifs credentials=/root/.smbcreds,nobrl,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0

Thanks for the help.

December 20th, 2008, 04:01 AM

December 21st, 2008, 12:11 AM

December 21st, 2008, 05:04 AM
Try changing "homeserver" in fstab to real server IP, like:
// /entertainment cifs credentials=/root/.smbcreds,nobrl,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
Maybe smb name resolving is slow?

December 21st, 2008, 05:44 AM
Made the change, re-booted to make sure everything was fresh, and I still get the same error and results.

December 21st, 2008, 06:45 AM
Sorry, I missed most important part: works in nautilu w/o problem.
So server name should stay as //homeserver/entertainment

Maybe try adding "noperm" to mount options - after man mount.cifs - typically only needed when the server supports the CIFS Unix Extensions but the UIDs/GIDs on the client and server system do not match.

December 22nd, 2008, 05:06 AM
Ah ha! mpokrywka, you are a genius! That seemed to have done it. I knew it was some small dumb thing I was doing.

Just so I understand, by default the client machine will try to manage permissions? So I have to pass noperm if the UIDs and GIDs on the client machine are different than the host? Then that will allow the server to manage things?

Thanks so much