Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-23-2005, 01:48 PM
|
#1
|
LQ Newbie
Registered: Dec 2005
Location: Peoria, IL
Distribution: Slackware
Posts: 3
Rep:
|
smbfs - Can't create files in subdirectories...
Greetings, I'm hoping someone can help...
I have a Slackware 10.2 server running Samba 3.0.20b. When I mount a share with
"mount -t smbfs -o username=user,pass=pass,fmask=777,dmask=777 //server/share /mount/point" (on another 10.2 PC) the mount completes successfully.
Logged in as a user, I can access the mount point and create files and
directories in the root of the mount point. I can also cd into the directories I've created.
But, I cannot create additional files or directories within the directories I created. My problem is that I cannot create anything within subdirectories on my Samba smbmount filesystem while running as a normal user. Creating files and directories within the root of the mount point (as a normal user) works fine.
Logged in as root, I can create subdirectories and subfolders to my heart's content.
Please, if anyone has any ideas on what to do / try, please reply!
Thank you in advance,
John
samba1@thelinuxrevolution.net
|
|
|
12-23-2005, 09:07 PM
|
#2
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
NFS is the natural way to share volumes between UNIX computers. In case you have Windows boxes on your LAN, keep Samba running. Just export the very same directory via NFS for *nix boxes.
|
|
|
12-23-2005, 11:23 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You have the permissions for new files masked out.
From the info page for "umask":
Quote:
14.9.7 Assigning File Permissions
---------------------------------
The primitive functions for creating files (for example, `open' or
`mkdir') take a MODE argument, which specifies the file permissions to
give the newly created file. This mode is modified by the process's
"file creation mask", or "umask", before it is used.
The bits that are set in the file creation mask identify permissions
that are always to be disabled for newly created files. For example, if
you set all the "other" access bits in the mask, then newly created
files are not accessible at all to processes in the "other" category,
even if the MODE argument passed to the create function would permit
such access. In other words, the file creation mask is the complement
of the ordinary access permissions you want to grant.
|
From the man 8 mount manpage:
Quote:
dmask=value
Set the umask applied to directories only. The default is the
umask of the current process. The value is given in octal.
fmask=value
Set the umask applied to regular files only. The default is the
umask of the current process. The value is given in octal.
|
fmask and dmask are similar to umask, but allow you to set different default permissions for files than for directories. For a world writable network share, it is common to not set the execution bit for files. However, for directories, the "x" bit serves a different purpose. It allows directories to be entered, so you want to have the "x" bit se]t for directories. In other words, it is overloaded.
Also, check that the username/password that your server uses matches your mount command entries.
The [i]man 8 smbpasswd[/i man-page can give you more information on adding users and changing passwords.
Much depends on how samba is configured. You may need to have phony accounts on the server that matches the users on the remote machines.
Last edited by jschiwal; 12-23-2005 at 11:35 PM.
|
|
|
12-23-2005, 11:43 PM
|
#4
|
Member
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216
Rep:
|
This is not correct for smbmount, which is what mount uses for SMB file shares:
From the smbmount man page:
Quote:
fmask=<arg>sets the file mask. This determines the permissions that remote files have in the local filesystem. This is not a umask, but the actual permissions for the files. The default is based on the current umask. dmask=<arg>Sets the directory mask. This determines the permissions that remote directories have in the local filesystem. This is not a umask, but the actual permissions for the directories. The default is based on the current umask.
|
The other thing to keep in mind is that Samba obeys the Linux file permissions. If the regular user can't create files in the subdirectory from the shell, they won't be able to do it from Samba either. Setting the dmask and fmask options on the mount command doesn't change this.
|
|
|
12-27-2005, 12:12 PM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I stand corrected. Sorry for any confusion caused.
|
|
|
All times are GMT -5. The time now is 09:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|