# Samba Share Problem with "read only"



## goodwince (Jun 17, 2008)

I am a Linux newbie, but everything has been going rather well. However, I've been scouring the internet for quite sometime today and was unable to find anything on my problem...

My networked samba share will only let me write files to the main directory of the share, I can't write files to any of the subdirectories.

I have a Samba share already from my Ubuntu 8 server to my XP machine that is working perfect, but I was wanting to create an additional Samba Share so I went into the smb.conf file and basically copy and pasted from the original already working Samba share, just changed the path.

Then did the "sudo chmod 0777 /var/" for file permissions

This worked perfectly as far as displaying all of the directory and being able to access the subdirectories. Looking at the properties of the folders however I can see that they're read only. I can even create a new folder in the main directory, but can't write to it.. 

Any help is greatly appreciated. Thanks in advance!


----------



## lensman3 (Oct 19, 2007)

My writeable area is everything under /home that my user name can get too. My personal directory has permissions of 0700 and it creates a file (and directory) with no problem.

[home]
comment = Home Folder
path = /home
guest ok = yes
writeable = yes
;	printable = no
; create mask = 0765
;	browseable = yes
; valid users = xxx ;the xxx was set to my login

I also have the last for lines, but they have been commented out. The default create mask for a file is 0744. For a directory created from XP, the mask is 0755. The properties of folders as displayed by XP are "read-only". I think the "read-only" means that a XP user can't edit the file and change the directory spec.

Several directories under the share mount point on my system are owned by various users. I can't open those folders. XP give a "not accessible" message. I don't run the [homes] samba option.

I hope this helps (I'm running Fedora Core 9 and smb version 3.2.0-17.fc9).


----------



## goodwince (Jun 17, 2008)

Ah, I think I figured out what my problem is.. I don't quite know how to solve it yet.

I was trying to make a samba share to the var directory, and it has special permissions associated with it. I need to look into a file manager and how to edit those permissions to where my samba user has permission to write to my "www" directory. 

If anyone has any advice on this I would greatly appreciate it. If I find anything out I will post it.

Thanks.


----------



## goodwince (Jun 17, 2008)

Alright well I got home just now and did a quick fix. 

Since I only needed to access/write to the "www" folder, I did 

sudo chmod 0777 /var/www/ 

Its probably not the best solutions but it is a quick fix for what I need.

Thanks for your help lensman3.


----------



## lensman3 (Oct 19, 2007)

Try a soft link. In a directory you can create files in, such as your home directory, type the following at a command prompt:

ln -s <THE REAL FILE OR DIRECTORY> <A SHORT CUT>.

So in your case: "ln -s /var/www ~/www" 

This will create a link to the other file. I use a similar link to go from a VMware XP that uses Samba to a link in my Linux home directory which then points to a mounted NFS volume on a third computer that holds all my music.

The way then you get to the director is: "cd www" when your in your home directory and the soft link "ln -s" takes you to /var/www.

Do a "ls -la" and you will see the soft link. To delete the soft link use "rm <link name>. It deletes the link NOT THE FILE OR DIRECTORY IT POINTS TO.


----------

