Originally Posted by
TheFu
Samba permissions really shouldn't matter, since smbd runs as root. Someone else will need to help with that. Last time I used samba for multiple users was in the 1990s. We used the same group for people with write access. It all worked.
It's not even for multiple users, it's only for me
As I understood from what I've been reading, smbd runs as root and sets permission on what it messes based on its settings. I added the following commands and surprisely it seems to be working now!
Code:
create mask = 0664
directory mask = 0775
force user = hikari
force group = naswrite
These commands were on their defaults before. I guess smbd was setting g=rx and that was messing with SMB part. Now it works:
Code:
drwxrwsr-x+ 2 hikari naswrite 4096 jan 22 00:50 test/
Windows provides the folder to be renamed after creation and I'm able to delete it. I didn't do many tests but there was no error msg so far.
Originally Posted by
TheFu
u+w is needed on the directories or the owner will be prevented access. There is a hierarchy for permissions. Owner permissions override group permissions which override "other" permissions.
Probably don't want whatever is causing the + is that from xattrs? ACLs are a '.' in that place.
Sorry I didn't understand anything u said :/
u+w is being attributed when folder is created:
Code:
drwxrwsr-x+ 2 debian-transmission naswrite 4096 jan 22 00:58 torrent folder
Oddly enought, I went to make another test and it seems to be working now. At least the torrent haven't stopped with error yet.
I was reading https://www.thegeekdiary.com/how-to-...a-samba-share/. ACL is enabled, but anyway I added it to fstab and remounted it. Then executed this command:
Code:
setfacl -R -d -m u::rwx,g:naswrite:rwx,o::r-x /nas/raid
Maybe it's what made it work.
This is how ACL is now:
Code:
$ getfacl /nas/raid/
getfacl: Removing leading '/' from absolute path names
# file: nas/raid/
# owner: hikari
# group: naswrite
# flags: -s-
user::rwx
group::r-x
group:naswrite:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:naswrite:rwx
default:mask::rwx
default:other::r-x
Originally Posted by
TheFu
Code:
drwxrwsr-x 2 hikari naswrite
is probably what you want for the top directories. Any newly created files or subdirs will inherit that unless an odd umask setting.
Provided the owner is in the naswrite grp, the owner doesn't matter. You don't need a script to fix things. Or at least you shouldn't.
"Other" may not need any permissions. Depends on the access goals.
Exactly. If group works and user doesn't step on the way, I can ignore user. That's what I was thinking when I first got issues from permission conflicts.
I don't believe all of a sudden all the issues are gone, but I haven't seen any error so far. I'm gonna get back into migrating torrents and make some other migrations too and see if anything goes wrong.
Bookmarks