Linux Server

[Solved]: Cannot write to the filesystem on Samba

ご注意下さい

この記事は3年以上前に書かれた記事ですので、内容が古い可能性があります。

0
(0)

It is a memo for me because I am sometimes in the similar trouble.

My case

  • The samba settings seem to be no problem with "testparm" command.
  • If you just read files on Samba, it is "NT_STATUS_OK" in the log.smbd log, but if you try to write file on it, it will be "NT_STATUS_ACCESS_DENIED" and will not be able to write it.
  • Samba directory permissions are also writeable and deletable.

It only appears to be Read-Only mode when accessing the filesystem via samba.

SELinux might prevent to write files. Check the SELinux. Just type "sestatus" on the command line. If you see "SELinux status: enabled", it is Bingo!

This is resolved by editing the following files and rebooting the server.

/etc/linux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected. 
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

That's all. Enjoy!

この記事は役に立ちましたか? | Is this article useful for you?

評価をお願いします | Please leave your rating.

平均 | Av.: 0 / 5. 投票数 | Votes: 0

最初の評価を下さい | Please vote for the first rating.

-Linux Server
-, , , ,

© 1999 - 2021 蒲田ネット