SOLVED: SMB Shares ACL settings

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

SOLVED: SMB Shares ACL settings

Postby lassenloop » Tue Jul 15, 2014 7:16 pm

I have a lot of files in my shares owned by apache. While I can take ownership of them myself. I would prefer to not have to keep taking ownership. I would also like to make sure apache has unrestricted access to the files it owns.

I made a script and ran it:

Code: Select all

#!/bin/bash echo Settings all directories in /var/hda/files hierarchy to RW for ACL users setfacl -R -m group:users:rw /var/hda/files setfacl -R -d -m group:users:rw /var/hda/files echo ACL set for all shares
Unfortunately, I can no longer access any of the shares via SMB. What should I change so that I can at least revert back to what I had before?

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: SMB Shares ACL settings

Postby lassenloop » Wed Jul 16, 2014 1:22 pm

Nevermind. I resolved it and can now read/write all apache owned files.

User avatar
bigfoot65
Project Manager
Posts: 11861
Joined: Mon May 25, 2009 4:31 pm

Re: SMB Shares ACL settings

Postby bigfoot65 » Wed Jul 16, 2014 2:23 pm

Is this something that would be worth adding to the wiki? If so, would you mind doing it? We would greatly appreciate it.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: SOLVED: SMB Shares ACL settings

Postby lassenloop » Wed Jul 16, 2014 3:35 pm

I don't mind. Just first let me know if you see any problems with what I did.

I made and ran the following script:

Code: Select all

#!/bin/bash echo Settings all directories in /var/hda/files hierarchy to RW for ACL users setfacl -R -m g:users:rwx /var/hda/files/ setfacl -R -d -m g:users:rwx /var/hda/files/ echo ACL set for all shares
The users group includes apache, the user created when setting up your HDA, and Transmission (in my case).

I also modified /etc/fstab

I changed "defaults" to "defaults,acl" for each drive.

User avatar
bigfoot65
Project Manager
Posts: 11861
Joined: Mon May 25, 2009 4:31 pm

Re: SOLVED: SMB Shares ACL settings

Postby bigfoot65 » Wed Jul 16, 2014 3:55 pm

You are more of an export that I, so I am sure this is fine. If you have a reference to tag on the wiki page, that would help too.

Since apache is part of the users group, I would not think this would be necessary. I guess that is not true.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: SOLVED: SMB Shares ACL settings

Postby lassenloop » Wed Jul 16, 2014 5:05 pm

I searched the forums a fair bit. Most of the web based apps are ran as user apache. For some reason, the files owned by apache cannot be edited through the the SMB shares. I can edit them just fine through the CLI. I found other people complaining of the same issue. One person wrote a script to resolve the issue, but it still had to be ran each time you wanted to manipulate files.

I did some research and found that ACLs were a good solution. So far, I don't see any problems caused by this. I can't think of any security issues this would create either.

Who is online

Users browsing this forum: No registered users and 2 guests