Click to See Complete Forum and Search --> : Samba+Directory/User Permissions
DSwain
01-12-2005, 11:14 PM
Here's the situation:
I'm migrating my server over to a Linux one from Windows. So far everything has been pretty good (using SuSE 9.1 btw, phenomenally easy to use) and it installed and everything, and now I'm working on getting samba to work with me.
I have Samba working because I can see the shares I created using YaST. I saw them but I couldn't access them. Just to test, I set one of the shares to 777 permission with chmod and that let me access the share farther, but it didn't share the subdirectories of it. I don't really want to go ahead and change every single directory to this as the extensiveness of the directory structure is rather huge. I also don't believe this is the correct way to do this. I guess what I'm asking for is a bit of help with permissions.
Just for a little more info, I have created a user for the server itself because I don't want to run root obviously. I don't really know if there's some way I can create a group which handles SMB shares or permissions on certain directories or what it would be exactly. Would the case be that I have to set the mount to rw in fstab?
soulestream
01-13-2005, 12:23 AM
need a little more info. are you accessing the shares from windows or linux. can you post your smb.conf file.
soule
DSwain
01-18-2005, 07:53 PM
Bump
Sorry about the slow responce, but I'm back around now. Anyways, I have tried to access it from both Windows and Linux. Both tell me that I have no permission to access the server. My website (http://swainnet.*****.org/) will tell you the same thing also if you are to look at it. I tried to use chown and change around some ownership but that doesn't seem to help me either.
Here's my smb.conf file:
workgroup = MSHOME
interfaces = 127.0.0.1 eth0
bind interfaces only = true
printing = cups
printcap name = cups
printer admin = @ntadmin, root, administrator
map to guest = Bad User
security = user
encrypt passwords = yes
passdb backend = smbpasswd
server string = SERVER
netbios name = SERVER
add machine script =
domain master = false
domain logons = no
local master = no
preferred master = auto
ldap suffix = dc=example,dc=com
[doug]
comment = Doug's Documents
path = /srv/samba/Doug
browseable = yes
guest ok = yes
printable = no
[install]
comment = Installation Files
path = /srv/samba/Installs
browseable = yes
guest ok = yes
printable = no
[music]
comment = Music Collection
path = /srv/samba/Music
browseable = yes
guest ok = yes
printable = no
[website]
comment = Wesbite Root
path = /srv/www
browseable = yes
guest ok = yes
printable = no
I'll probably change whether it's possible to have guests or not later but for now I'd just like to see it working. I still don't know though if it would be because of the smb.conf file though as it still seems like an ownership problem. If that's the case, the user I'm trying to run the server from is named server. I tried to chown the owners over to server, but most of them are keeping a root permission scheme which I am lead to believe is the problem. Maybe someone can explain to me how to change the ownership of all the files and subdirectories in one command? This is just what I think is the case though.
DSwain
01-18-2005, 10:35 PM
As another update, I've come to the conclusion that permissions is the problem, but my next issue is migrating all these permissions quickly. I obviously don't want to go and change all of them simply to gain access into my things, as there are many files to be changed and directories. Do you think there's a good way to quickly script this process, or maybe some type of chmod argument, or another program?
Okay, I seem to have solved it. It's simply a large permissions problem. Since I'm migrating this server from Windows to Linux I suspect all the files hold a root ownership towards them which makes it very hard to work with. Managed to use Konqueror to change the permissions though. So, for anyone having permission troubles, make sure to verify that the permissions are not pointed at root. Unless you're using root as your user which I doubt is the case for most. So any migraters just be prepped for that.
stiles
01-19-2005, 06:38 AM
a quick look at the chomod (and chown for that matter) man page will reveal the -R switch. If I wanted to have a different mask for directories and files I would prob use find with the -t switch and execute chmod with the -exec switch.
DSwain
01-19-2005, 05:38 PM
Yeah I was looking at the man pages for both of those things, but I didn't see that the -R tag would help me. Personally didn't seem very consice from the man pages, but thanks I'll be sure to go take a look at that.
It's running somewhat better now though, but I'm having trouble getting into other parts of my site even though the permissions are fixed. I believe it may be something on Apache's end of things so I'll have to look more at that.