LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-21-2003, 04:16 PM   #1
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Rep: Reputation: 15
Can not write to SAMBA directory


I have set up Samba to run off my Linux box and the files that i have on there share ok with the Windows machines on the network. However i wish to enable a couple of the directories to accept files from the windows machines,

I have tried adding the lines

Code:
[Work]
	path = /mnt/hdb1/gateway/work
	public = yes		
	guest ok = Yes
	writable = yes
to my smb.conf file but it still aint working. I have also 'chmod 755 work' the directory, but that seems to have done nothing. Any one got any ideas becasue i am out?

Cheers in advance,


nairnie
 
Old 11-21-2003, 04:35 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
Who owns the directory? Try chmodding it 777.
 
Old 11-21-2003, 04:58 PM   #3
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Original Poster
Rep: Reputation: 15
I am new to all this linux stuff so not quite sure what you mean by who 'owns' the directory. I am in as root and i created the directory, as root. The directory is located at /mnt/hdb1/gateway/work (as shown in the original post). I have tried 'chmod 777 work' but it says:
Code:
mode of `work' changed to 0777 (rwxrwxrwx)
chmod: changing permissions of `work' (requested: 0777, actual: 0755): Operation not permitted
ls -l then returns drwxr-xr-x
 
Old 11-21-2003, 05:14 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
When you run ls -l it should also give you a user and group. If these are both root then your clients will be unable to write to the directory.

What filesystem is on the partition?
 
Old 11-21-2003, 05:36 PM   #5
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Original Poster
Rep: Reputation: 15
I think you may have hit the nail on the head. ls -l returns

Code:
drwxr-xr-x    5 root     root        32768 Nov 13 21:48 work
Is it possible to change this? Or should i set up a new folder differently?

The disc was formatted in Windows XP as Fat32 using partition magic 8, it is just a single partion of 120GB. I then copied some files to it from that computer (as it was quicker than doing it accross the network) before putting it into the Red Hat 9 box. The files on it can be read and written to by RedHat. The files that are shared from it can be read by the windows machine (as read only) but i can not edit them or add additional files to the directories from the networked windows machines.

I am getting tempted to follow your sig's advice "If all else fails: "rm -rf /"" and see if that helps to resolve my problem

Last edited by nairnie; 11-21-2003 at 05:37 PM.
 
Old 11-21-2003, 05:48 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
since fat32 (vfat) partitions cannot store permission information you will need to mount the whole partition as readable/writeable by all the users.
 
Old 11-21-2003, 06:43 PM   #7
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Hmmmm..... not sure how do i do that.

i have tried going to /mnt and entering "chmod -v 777 hdb1" but it kicked out the same error.

I then tried using the gui to chnage the permissions and group and owner but it wouldn't let me. I have googled for it and seen that some people refer to changing the settings in fstab, but i am unclear on exactly what i am supposed to change, and what values to change it to.

Do i have to unmount it and then remut it. If so how can i do it so that other users get access?

Sorry for all the questions, i am still trying to find my feet in Linux.

Cheers,


nairnie
 
Old 11-21-2003, 07:20 PM   #8
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
First of all, the directory gateway/work is on your second Hard Drive (hdb1).

In order to change the permissions of a FAT32 partition, you will need to edit the /etc/fstab file.
You should already have a line for /dev/hdb1
On this line, you will need to add the umask option.
For example:
Code:
/dev/hdb1              /mnt/hdb1              vfat    defaults,umask=0000        0 0
The next time the machine is rebooted, it will automatically apply the permissions.
 
Old 11-21-2003, 07:58 PM   #9
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks Dave and Mathieu,

Seems to be working now. All i have to do is configure the rest of it now.... so knowing me likei do i think i will probably be looking for more help in the near future.

Cheers,

nairnie
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba directory permissions - can't write from XP ajkrishock Linux - Networking 2 10-16-2005 12:56 PM
How do I mount a samba directory with write permissions? xerogravity Linux - Newbie 7 12-05-2004 01:43 PM
samba guest directory once write then no delete ilnli Linux - Networking 1 08-30-2004 01:36 AM
Could not write to my home directory comprookie2000 Linux - Newbie 19 05-11-2004 08:36 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM


All times are GMT -5. The time now is 01:14 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration