Page 1 of 1

[SOLVED] User Level Access Control--Like QNAP

Posted: 23 Jan 2015 17:59
by stevencomerthor
At work we use a QNAP-879Pro as a file server. I configured all the users in the office to have customized permissions on the company directory.

A few of us can see every folder and subfolder in the directory, others only have limited access.

I use a N4F box as a LAN backup for the most critical trees on the directory, however, I have a problem.

There is a subfolder that is buried in the directory that needs to have limited access, and on the QNAP, doing this is easy. Once I back it up using rsync to the N4F box, though, I have an issue with having the same permission structure that I had on the QNAP. It seems that once I serve up a Samba share that all the subfolders and subdirectories have the exact same permissions as the highest folder.

Is there a way to manipulate the permissions of folders deep within a Samba Share? Could it be possible to create an extension where I could set arbitrary permissions within a Samba Share for specific folders, even files, while keeping the rest of the directory accessible to all registered users and keeping the zfs dataset accessible to my rsync server & client?

Thanks

Re: User Level Access Control--Like QNAP

Posted: 03 Feb 2015 15:39
by stevencomerthor
I figured it out! Consider this solved.

Using cron I scheduled some commands

Code: Select all

/usr/sbin/chown -R USER2:admin "/mnt/backup/BEACONbkup/BEACON Administration/Administration"
The above statement takes place after the rsync occurs, so that the permissions are set for all the clients--only USER2 and all in the admin group have access to this buried subfolder and contents.

Code: Select all

/usr/sbin/chown -R nobody:wheel "/mnt/backup/BEACONbkup/BEACON Administration/Administration"
The above statement takes place just prior to the scheduled rsync so that the main server can back up the day's work

All the users have access through SAMBA, all clients are windows 7. All the clients are users on the NAS4free with passwords. SAMBA is set up with all defaults. It works! All the windows clients had to restart to access the NAS4free once it was fully configured.

The main server is a QNAP and the rsync is QNAP to NAS4free.

I spent a little time reading to figure out how to configure these, possibly a few years, I tried FreeNAS (but I've old hardware that I don't want to replace) and then I found NAS4free was much more compatible.

The NAS4free backup NAS is only a LAN device for the purpose of backing up the working directory of the company.