Freenas (FreeBSD) permissions

nfdevil

Honorable
Jan 15, 2014
11
0
10,510
Hi,

I've got my Freenas server up and running for some months now. But because I don't have very much knowledge of the FreeBSD/Linux way of using users & groups, I've got the guest account having full control on my directories.
But a week ago, I was putting a movie I downloaded from my downloads folder to my movies folder on my Windows computer. Then I found out I accidentally cleared the whole movie folder somehow. I have no idea how that happened, because I havent seen a 'deleting' window or confirmation and nothing in my trash bin.
So to keep me from making such mistakes again, I'd like to try and set my permissions up perfectly now.

However, my lack of FreeBSD knowledge stops me from setting the permissions up how I want them. I'm hoping someone here wants to help me a bit on what to set as owner/groupowner of the directories and files to get it working.

What I had in mind:

Volumes:
mnt
- storage
-- jails
-- - (all jails)
-- media
-- -- media/downloads
-- -- media/movies
-- -- media/music
-- -- media/series
-- -- media/torrents
-- -- media/tutorials
-- -- media/photos

NFS and SMB share on the ‘media’ directory (mnt/storage/media)

Users:
Root: rwx Access to everything obviously
Guest: Read access to everything in media (mnt/storage/media/*)
User X: r-x to everything in media and rwx to media/photos
User Y: r-x to everything in media and rwx to media/photos
(any other users/groups that are needed to get the plugins below working)

Plugins:
Sonarr:
- must be able to put a torrent in media/torrents for transmission to watch and delete it when done downloading? Unless this is not needed, because transmission does this?
- must be able to get the serie episodes that are downloaded, from the media/downloads directory after transmission is done downloading it, moving it to the media/series directory and deleting it from the media/downloads folder
- must be able to download metadata and rename folders/files in the media/series directory
-> current jail storage I’m using: media/series, media/downloads
Couchpotato: same as sonarr but with the media/movies directory
-> current jail storage I’m using: media/movies, media/downloads
Headphones: same as sonarr but with the media/music directory
-> current jail storage I’m using: media/music, media/downloads
Plex media server/XBMC (on my HTPC RaspBerry Pi with OpenElec):
- read, execute and write metadata and the files from the media/music, media/movies, media/series, media/tutorials, media/photos directories
-> current jail storage I’m using: media/series, media/movies, media/music, media/photos, media/tutorials
Transmission:
- being able to rwx torrent files and delete them in media/torrents and media/downloads
-> current jail storage I’m using: media/torrents, media/downloads

Thanks in advance for reading through this long post and I hope anyone is able to point me in the right direction and helping me out a bit.

Really thanks!

Nils



 

McHenryB

Admirable
The FreeNAS manual provides a pretty comprehensive account of how to set shares and their permissions. It's probably best to stick with the methods described here rather than working with the permissions via a command prompt.

You could also have a look at the FreeBSD documentation (on their web site) if you want to understand BSD permissions at a lower level.

http://doc.freenas.org/9.3/freenas_sharing.html