LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2005, 01:25 PM   #1
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Rep: Reputation: 15
Mount / Samba Permissions


My brand new Fedora 3 box is mounting a 30GB FAT32 secondary drive at startup and sharing out the root folder of this mounted drive (just data) via SAMBA. When I browse out to the network with my XP Pro box I can see all files from that 30GB drive but I don't have access to create / modify any of the files.

I'm not using a domain controller, just a peer-to-peer and I want every user on my network (all 2 of them) to have read/write permissions to the mounted drive.

Here is my fstab file:
/dev/hdd1 /mnt/test / auto,rw,sync 0 0

Here is my smb.conf entry for this share...

[test]
path=/mnt/test
writeable = yes
guest ok = yes

Any advice or pointers would be great !!

Thanks everyone !!
 
Old 04-08-2005, 01:51 PM   #2
tisource
Member
 
Registered: Feb 2002
Posts: 322

Rep: Reputation: 30
You may want to verify that root can write to this drive from the console. As root, CD to the mount point of your FAT32 partition and try 'touch file'. It should create a file called 'file'. If you can't modify the FS as root, samba definitely won't work.

Also, which samba user is set up to be guest? 'nobody' or 'guest' ??

If you have a user that maps to guest, then you can add this to the share:

admin users = guest

That will give the guest user admin access (root equivalence).

Last edited by tisource; 04-08-2005 at 01:54 PM.
 
Old 04-08-2005, 01:58 PM   #3
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
I think this should be the line of the fstab file instead:
Code:
/dev/hdd1 /mnt/test / auto,rw,sync,users 0 0
Try that.

calcon
 
Old 04-08-2005, 02:02 PM   #4
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks calcon and tisource !!

I'll try both of your answers and reply with the results.

tisource -- You said .....
>>>Also, which samba user is set up to be guest? 'nobody' or 'guest' ??
>>>If you have a user that maps to guest, then you can add this to the share:

I do I know this? Change this ? What 'should' it be?

I only have 1 user which is 'root'. Nobody else. Bad?

My goal is to make the FAT32 drive completely open to all users no matter what.

Thanks again.

Last edited by joshnya; 04-08-2005 at 02:11 PM.
 
Old 04-08-2005, 02:04 PM   #5
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
I didn't say that.

I don't really know about samba, but I think that that may solve your problem.

Ok, I'll be waiting for your results

calcon
 
Old 04-08-2005, 02:36 PM   #6
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
I think I'm in over my head. Here is my fstab file....bolded is my FAT32 entry. When I boot or do mount -a from the command prompt I get this message .... What does it mean?

[root@localhost etc]# mount -a
mount: fs type users not supported by kernel

=======================================================================

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,fscontext=system_ubject_r:removable_t,ro,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
/dev/hdd1 /mnt/test sync,rw,users 0 0

Last edited by joshnya; 04-08-2005 at 02:37 PM.
 
Old 04-08-2005, 03:33 PM   #7
Harmaa Kettu
Member
 
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
If your system doesn't already have samba user, create it:
Code:
useradd -d /dev/null -s /bin/false -u 123 samba
123 is just an example, you can use any unused uid number.

Tell samba to use the new account by adding this to the [global] section of the configuration file:
guest account = samba

The fstab line should be:
Code:
/dev/hdd1 /mnt/test vfat auto,rw,uid=123 0 0
Mount the partition and restart samba. It should work now.
 
Old 04-08-2005, 03:44 PM   #8
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
Harmaa Kettu --- Thanks. I did exacly what you said and it works now. I appreciate the responses.
Thanks again and have a great weekend !
 
Old 04-08-2005, 04:39 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I'm glad that you got it working.
I assume that you noticed that you dropped the filetype when you changed the fstab line.

/dev/hdd1 /mnt/test sync,rw,users 0 0

As a somewhat separate issue, you can assign ownership and group ownership to VFAT mounts by including 'uid=' and 'gid=' options in the fstab line. For example 'uid=joshnya' would make the user 'joshnya' the owner. It is done this way because the FAT32 filesystem doesn't store the same permissions as a native Unix file-system. Also, you need to have the mount working before offering it up as a share.

You mentioned earlier that only have a root user. That is not a good idea. The root user should only be used for maintainance and configuration. If you make a mistake, you could effect areas that a normal user couldn't. You might also want to use the 'visudo' to edit the /etc/sudoers file to allow you to execute common root commands such as '/sbin/shutdown -r now'.
This particular option can be done by simply removing a comment hash symbol from the line "#"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
samba: mount-folder in client gives only root permissions mvo Linux - Newbie 3 09-16-2005 12:39 PM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 07:21 AM
Permissions on a samba mount of a samba mount rimcrazy Linux - Networking 0 04-15-2005 08:57 AM
SAMBA says 'Samba Server is not accebile, you might have no permissions' Ahmad Gurchani Linux - General 1 01-01-2005 11:34 AM
How do I mount a samba directory with write permissions? xerogravity Linux - Newbie 7 12-05-2004 02:43 PM


All times are GMT -5. The time now is 10:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration