Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba Config not allowing 0666 permisions on a mount

Status
Not open for further replies.

CamaroLT

Programmer
Dec 16, 2002
159
CA
Hey all;

I've got a dent in my forehead from beating it on the desk because of this problem.

Setup: Three machines
- Ubuntu 8.10 - Samba Server
- Ununtu 8.04 - Client
- WinXP Pro - Connects to 8.10 via VPN to gain access to the share

I have *FULL* root access on all these three machines (8.10 is a Virtual Machine, 8.04 is my desktop client for work, and the XP machine is my home machine).

Heres the share I'm fighting with:
Code:
[vacation]
  comment = Apache Web Server
  force user = webuzr
  force group = [URL unfurl="true"]www-data[/URL]
  browseable = yes
  writable = yes
  create mask = 666
  security mask = 666
  force create mode = 666
  directory mask = 0777
  directory security mask = 0777
  readonly = no
  available = yes
  public = yes
  path=/var/[URL unfurl="true"]www/vacation[/URL]

I can successfully mount the directories on the 8.04 machine and navigate the directories, as well as I can map a drive on the XP machine, no problems. That aspect works. I've changed the masks to be 0666 or 0777. For now, once I get the permissions working so I can create files, and have them setup with proper security, I'll lock it down a bit more.

This is how I mount the directory on the 8.04 machine
Code:
mount //vmsgc/vacation ~/vacation/[URL unfurl="true"]www -o[/URL] user=stephen,pass=[img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img][img]http://www.tipmaster.com/images/frog.gif[/img]

I haven't done this with the XP machine yet, but with the 8.04 machine, when I go into the mounted directory, and touch a new file, the permissions that show up are RW/R/R regardless of what I have setup in the config. I cannot change the permissions on files while in the mount. However, I can obviously change them on the 8.10 machine. Once I chmod the file to 666 on the 8.10 machine, I can read, write, and modify till my hearts content.

What am I doing wrong?

I've done the obvious of restarting Samba. I've even gone as far as unmounting the directories, restarting Samba, ensure there was no Samba process running (ps auxx | grep s | grep m | grep b) and saw nothing of relevance, started Samba up, remounted. Just did a test before I submitted this email, and it still failed.

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=
NEVER send the boss to do a techs job
 
On my system, you need to have a four-digit permission or it won't work. You also need to set 'force create mode' and 'create mask' for this to work properly. I have this working with two lines (no security mask.)

Try:

Code:
create mask = 0666
force create mode = 0666

Prior to setting both like this prefixed with a zero, it didn't work for me either.
 
What I did to fix the problem was install Webmin. I don't know if I had a typo or whatever, but I got the shares working the way I wanted them to.

Its changed it to:
Code:
[www]
comment = Apache Web Server
force user = webuzr
force group = [URL unfurl="true"]www-data[/URL]
browseable = yes
writable = yes
create mask = 0640
security mask = 0640
directory mask = 0750
directory security mask = 0750
readonly = no
available = yes
public = yes
path=/var/www

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=
NEVER send the boss to do a techs job
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top