LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 05-03-2004, 03:05 PM   #1
Nylix
LQ Newbie
 
Registered: May 2004
Posts: 9

Rep: Reputation: 0
Unhappy Permissions/group access when using Samba


First off, I'm a newbie so I apologize up front if my question is simple (since I've been told that there's no such thing as a stupid question)...

I have Mandrake 10 running on an old machine on which I have installed Samba which performs the task of a fileserver. This in itself works great, but I'm somewhat lost when it comes to persmissions etc.

When I connect from another machine (also a Mandrake 10 host), I use an account which I have created on the Samba file server. This works fine but sometimes, I am unable to write files to the fileserver due to permissions. I then have to assign 777 permissions to the folder on the Samba host before I can copy anything onto it from the other machine...

question: When accessing a fileserver from another machine, which user account takes precedence - the Samba account which I use from the other machine or the current user account with which I am logged on on the machine I am copying from?

ps: When I am able to copy files across, it says that it was unable to change the permissions...

Thanks in advance!
 
Old 05-03-2004, 03:34 PM   #2
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Re: Permissions/group access when using Samba

Quote:
Originally posted by Nylix
First off, I'm a newbie so I apologize up front if my question is simple (since I've been told that there's no such thing as a stupid question)...
That's right - no stupid questions, just stupid answers


Quote:

question: When accessing a fileserver from another machine, which user account takes precedence - the Samba account which I use from the other machine or the current user account with which I am logged on on the machine I am copying from?
Samba normally accesses the filesystem with the user that authenticated to it, which should be a user on the file server itself (normally). To be able to write in a directory, a user needs rwx permissions on it, either as owner, as the group or as other. Since you have to set 777 permissions, I suspect that the user you are using is not the owner of the directory in question, and his primary group is not the group of the directory either. Check that first (ls -ld /path/to/directory).

Alternatively, you might have set up Samba to use guest access. If you think that's the case, post the relevant section of smb.conf and we'll see what we can do.
 
Old 05-03-2004, 03:53 PM   #3
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Re: Permissions/group access when using Samba

Quote:
Originally posted by Nylix
First off, I'm a newbie so I apologize up front if my question is simple (since I've been told that there's no such thing as a stupid question)...

I have Mandrake 10 running on an old machine on which I have installed Samba which performs the task of a fileserver. This in itself works great, but I'm somewhat lost when it comes to persmissions etc.

When I connect from another machine (also a Mandrake 10 host), I use an account which I have created on the Samba file server. This works fine but sometimes, I am unable to write files to the fileserver due to permissions. I then have to assign 777 permissions to the folder on the Samba host before I can copy anything onto it from the other machine...

question: When accessing a fileserver from another machine, which user account takes precedence - the Samba account which I use from the other machine or the current user account with which I am logged on on the machine I am copying from?

ps: When I am able to copy files across, it says that it was unable to change the permissions...

Thanks in advance!
and the answer is, try to use NFS....

Samba is a bitch, Oh and if you do manage to get it working... DO NOT and repeat DO NOT try to update it....

it'll never work again.....

- perry
 
Old 05-03-2004, 04:04 PM   #4
Nylix
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Ha! Thank you for the good tip - it's silly how one overlooks the obvious when it's right under your nose!

I have managed to sort this out a little bit further... I am now stuck at the following point:

When I try to copy a folder that includes some MP3 files to the fileserver, the folder is created on the fileserver but an error pops up that I do not have the permissions to write to the folder.

When I look at the 'ls -l' listing of the folder, it shows the following: drwxr-xr-r. The user is the owner of the directory and also belongs to the group (which is coincidentally the same name as the username). Do I also have to add write permissions for the group, i.o.w. drwxrwxr-x ?

Thanks for the help so far!!!

>>Edit: the thanks for the tip I mentioned refers to the previous comment - not the NFS comment!! I have not looked at NFS yet - but any advice would be good though...

Last edited by Nylix; 05-03-2004 at 04:07 PM.
 
Old 05-03-2004, 04:58 PM   #5
pgmer6809
LQ Newbie
 
Registered: Apr 2004
Distribution: Mint 21.1 Vera
Posts: 23

Rep: Reputation: 0
Samba vs NFS

Unix was doing file sharing long before windows or Novell.
The way Unix did this was (and is)via NFS. NFS therefore is nicely integrated into Unix (and hence Linux). In techie terms it uses Unix file semantics. It thinks about permissions and users the same way that Unix does.
Samba is designed to allow Windows to Unix (and vice versa) filesharing. As such it has to try to make windows look like unix and unix look like windows.

If you are running a Unix (Linux) only network, you don't really need the extra complexity of Samba. You can just use NFS.

One warning though: NEVER NEVER NEVER do a 'hard' NFS mount as part of your boot up sequence. If the other machine is not available, or the network is down, your boot sequence will not complete,and your machine will hang.
If you must mount NFS drives at boot time, then do a 'soft' NFS mount. It will time out (slowly!!) if it does not succeed and at least your machine will finish its boot up.
 
Old 05-04-2004, 12:29 AM   #6
Nylix
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Smile

Mmmmm, I do have some Windows hosts in my network though - would it still be possible to use NFS for Windows? Another possibility might be to install additional network components for the Windows Hosts which will allow for it to communicate with a NFS machine...

Any possible solutions are welcome! Could anyone possibly direct me to some good sites where I can get some information on NFS and also the installation/configuration of it?
 
Old 05-04-2004, 02:44 AM   #7
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Quote:
Originally posted by Nylix
When I try to copy a folder that includes some MP3 files to the fileserver, the folder is created on the fileserver but an error pops up that I do not have the permissions to write to the folder.
When I look at the 'ls -l' listing of the folder, it shows the following: drwxr-xr-r. The user is the owner of the directory and also belongs to the group (which is coincidentally the same name as the username). Do I also have to add write permissions for the group, i.o.w. drwxrwxr-x ?
Hmm, than the user that Samba is using is not the user we think it's using. If you set the directory permissions to 777, and copy the mp3 files into it, who is the owner of the files? That is the user samba is using.
 
Old 05-04-2004, 03:01 AM   #8
Dave Farrance
Member
 
Registered: May 2004
Location: UK
Distribution: Mandrake 10.0
Posts: 47

Rep: Reputation: 15
Samba's nmb and smb logfiles, usually somewhere in the /var/log tree, are very useful for telling you why something has been refused.

You can set the amount of information tht goes to the logfiles in the samba config file. I don't know if you can do that from Samba's GUI manager, because I've never used it.
 
Old 05-05-2004, 03:39 PM   #9
Nylix
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for all the handy tips!! I'll have a look and see whether I can figure this problem out! You've definitely helped me in he right direction!!

: ))
 
  


Reply



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
Permissions for Samba Access BerlinBadger Linux - Networking 1 10-28-2005 09:13 AM
samba : access denied for some user in same NT group on a folder mtrento Linux - Networking 0 06-27-2005 10:01 AM
group access for specic folders in samba fidelis Linux - Networking 0 09-20-2004 03:20 AM
Samba file access permissions bryanl Linux - Networking 0 01-04-2004 05:16 PM
Samba: What group/user is used by Samba to access directories? DJ_Cyberdance Linux - Networking 3 10-04-2003 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 12:52 AM.

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