Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-29-2004, 10:36 AM   #1
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Rep: Reputation: 30
Samba and permissions

Hey all,

I'm having some permissions issues with a Samba share on a remote system. I have a folder shared via Samba, and in the smb.conf file I'm giving full permissions to valid users (by group). On the system connecting, I have made the proper fstab entries so that I'm effectively mounting the shares on bootup. Everything works fine as far as that goes, but the permissions are always being set to 755, and the owner is always root. I need to change this to allow other users (apache) to be able to write to the share as well. But, no matter what I've tried, I can't change the permissions from the machine that's connected. What I've tried:

- Give full permissions on the source machine to all users
- Give full permissions on the mount folder on the connecting machine (changes on bootup though)
- Give full permissions in the smb.conf file
- Tried to to a chmod as the root user on the connecting machine (get operation not permitted.. even though it's owned by root)

So, I'm a bit stuck here, and need to get this working. Is there an option in the fstab entry perhaps that could set this? Is it something else in samba? Any suggestions or advice would be greatly appreciated.


Quick edit: Both systems are running Fedora on ext3 filesystems. I can post config files as needed also.

Last edited by Phaethar; 03-29-2004 at 10:40 AM.
Old 06-16-2004, 09:55 PM   #2
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
I realize that it has been a long time since you posted this problem, but I have an idea that might be worth looking into, if this problem is still affecting you. If you go to the directory that has the files in question and then run:

lsattr *

lsattr is a tool that list file attributes, if any attributes are listed for these files it may well restrict your ablity to modify these files. To see the definitions of the given attributes, you can 'man chattr' which has breif discriptions of the various attributes that you might see.
Old 06-17-2004, 08:03 AM   #3
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Original Poster
Rep: Reputation: 30
Hey Kvedaa,

If I remember correctly, this was a Samba issue where permissions weren't assigned correctly when another Linux system tried to mount the shared drive. What I had to do was set the permissions (and users if need be) in the fstab file itself. So, if I wanted to mount a samba share automatically, my fstab entry might look like this:

//servername/share /mountpoint smbfs uid=500,gid=500,fmask=777,dmask=777,credentials=/home/user/.smbpasswd 0 0
I like using the smbpasswd file as well (or some other name) as that way I don't have to put the username and password in the fstab file.

Using this method, I'm able to mount Samba shares from other Linux partitions with whatever permissions I want.

It would be interesting to see what attributes lsattr would show when mounting a share with the default settings...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Permissions? ezra143 Linux - Networking 1 02-22-2005 01:26 PM
SAMBA says 'Samba Server is not accebile, you might have no permissions' Ahmad Gurchani Linux - General 1 01-01-2005 10:34 AM
Samba and permissions ezra143 Linux - Software 8 11-05-2003 05:39 PM
Samba permissions djtsa Linux - Newbie 6 10-03-2003 07:22 AM
Samba Permissions ppuddick Linux - Networking 2 08-02-2002 03:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration