General discussion

Locked

Trouble writing to a SMB share

By craigmjackson ·
Hello,
I am having a problem with RedHat 9 that I have not had with other versions regarding samba mounting. When I am logged in as "craig" (my username) I can right away and with nothing special configured go to smb://dan/applications from the address bar, it asks me for password authentication, and it reads and writes like it should. I am trying to mount my shares as boot-time in /etc/rc.d/rc.local.
I created a credential file in /root called .smbpasswd and made the /dan and /dan/applications directories. I also created a group called powerusers and added the users "craig" and "justin". The command I am issuing is:

mount -t smbfs -o credentials=/root/.smbpasswd,gid=powerusers //dan/applications /dan/applications

This allowsme to read/write to the /dan/applications directory just fine as root. When I log in as "craig" i can read but not write. This is mind-boggling because when I am logged in as "craig" and I do a "ls -l" it shows the owner of /dan/applications to be"powerusers", of which I am a member. Am I going about this all wrong? Thanks for your help.
Craig Jackson
craig@jacksoncomputing.us

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Trouble writing to a SMB share

by Lintadsl In reply to Trouble writing to a SMB ...

Did you check the folder permission? It should be 755 in order to a member can write to that folder.
In Smb.conf, check the security level and post here what it is.

It sounds like you are on right track but missing minor things.

Regards,

Collapse -

Trouble writing to a SMB share

by craigmjackson In reply to Trouble writing to a SMB ...

This pointed me in the direction of unix permissions. Thanks.

Collapse -

Trouble writing to a SMB share

by bwaynef In reply to Trouble writing to a SMB ...

Sounds to me like you probably already have 755 permissions on that directory. That is, r/w/x for the user, r/x for the group, and r/x for others. What you need is to add "w" permissions to the group. Type chmod -R g+w . . Note the 1st . is required as it points to the current directory. (Type cd . and it will change directories to the same directory.) Basically this will add w (write btw) permissions for the group. Now assuming craig is a member of the group to which this directory's owner belongs then you should be given write permissions. (If you'd like to manually set the permissions try:
chmod -R 775 . supposing you want the "others" to have r/x permissions. It would do the same thing as above, but the above doesnt grant the "others" any permissions that they don't already have.)

Collapse -

Trouble writing to a SMB share

by craigmjackson In reply to Trouble writing to a SMB ...

Yet deeper into unix permissions. I have done all of the above. It seems the permissions stay as they are until i mount the directory again. It would seem to me that samba is re-assigning permissions. On the Windows share, I made sure permissions were not the issue, the users actually have "Administrator" privileges to the share, and the w2k clients have no such issues, so that rules out a w2k permissions problem. I have since switched to Slackware 9.0. I am getting identical problems. Ihave looked at the "mount -t smbfs" command line parameters and attempted to assign different uid's and gid's, just to eliminate some things (I wouldn't implement it that way) as well as the "fmask=" and "umask=" options. As soon as I mount the share, all the permissions change to "drwxr-xr-x". I try to "su" and change them explicitly with chmod -R ugoa+rwx /dan/applications(i want them to be "drwxrwxrwx", and it seems like it's working (lots of hd access) but not a damn thing actually happens to the permissions. Am I giving samba more godly powers over things than it should have? Or are unix permissions not as powerful as samba's service? It seems like such an easy thing to do, yet its errorhandling of this issue has much to be desired. I had lots of luck sharing with samba, you'd think the client would be a piece of cake. Thanks for your help, I know there's SOMEONE out there that has run into this, anyone with a NT server with a linux client needing a user folder would have the same problem.

Collapse -

Trouble writing to a SMB share

by jacobmather In reply to Trouble writing to a SMB ...

I just tried this locally and it worked...
Make sure the username your logging in as on the windows computer has read-write access to the directory locally... then...

mount -t smbfs -o username=user,password=pass,rw,fmask=775,dmask=775 //windowspc/fileshare /mnt/somewhere

Collapse -

by craigmjackson In reply to Trouble writing to a SMB ...

Yes, that is exactly what I needed - the ability to mount something while setting its permissions. If only I knew what the 775 meant. :) Hey, at least it works!
Thank you

Collapse -

by craigmjackson In reply to Trouble writing to a SMB ...

This question was closed by the author

Back to Linux Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums