LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't write to Samba Share (https://www.linuxquestions.org/questions/linux-software-2/cant-write-to-samba-share-362146/)

d00msdaypr0phet 09-11-2005 10:01 AM

IF this partition in on your linux system I would recommend simplifying your config. Make the share public see if that works. also I would say use chmod 770 on the linux dir that shared. I dont know if you are in peer, domain, or ADS mode so this may seem vauge. Also Log files are you friends. Use them...even jack up the log levels to say 5 in the smb.conf if you can to glean more info as to the problem..atm you are shooting in the dark.
-ddp-

Matir 09-11-2005 11:29 AM

vimal - I'm not sure where you got that this has anything at all to do with ntfs. It doesn't, it's all samba on ext[2/3] or reiserfs.

I think snowbat hit it on the head. I missed it last night. That create mask should be 0000 to give full permissions to everyone. As a mask, it gets negated before being used.

perihelion 09-11-2005 03:21 PM

Just for kicks and giggles I created a very simple wide open share.

[test]
comment = Test share
path = /shares/test
read only = No
guest ok = Yes

The /shares/test directory is set to 0777. I restarted the service, went to my XP box, and tried to copy "config.php" to the share. Again I was told either the disk was full or I lacked permission. I guess Samba just isn't for me. I did turn up the log level to 3 -- at that point I could see where the permission was being denied, but it didn't make any sense that it should be denied. It should be a simple, albeit very unsafe share that is writable by everyone.

Matir 09-11-2005 03:24 PM

What did it show when it denied permission?

perihelion 09-11-2005 04:26 PM

OK... got it fixed. It was something stupid. I don't know much about SELinux, but once I shut it down and rebooted, everything started to magically work. Thanks for all the help.

Matir 09-11-2005 04:28 PM

Really odd. I wonder what interaction they have. And people wonder why I won't touch SELinux :)

davidedwardgill 03-12-2012 10:39 AM

This is a 7 year old thread. I am writing on it because it comes up first for google with "samba cannot write to share". This is an auto fill after samba cannot.

Anyway.

SELinux is a great security tool. You just need to know to use it. Anyone setting up actual servers SHOULD have SELinux running. If it is for your home videos or the such... Who really cares...

SELinux has rules, these are the rules that matter for a basic samba server. There ARE other rules for samba though.
setsebool -P samba_domain_controller 1
setsebool -P samba_enable_home_dirs 1
setsebool -P samba_export_all_ro 1
setsebool -P samba_export_all_rw 1
setsebool -P use_samba_home_dirs 1

SELinux's mystical why doesn't it work problems are labels. For what ever reason no one knows they exsist... Infact these labels can cause issues with SElinux off... I don't know how, but they can.
chcon -t samba_share_t \share\backup

If you are using a home server and really don't care. Don't just yum remove selinux. Make certain to find a good removal document for it.


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