Hi guys, just a simple question on using ZFS with Linux. TL:DR: Do I just CHOWN the mount directory to my user account [me] to use a ZFS dataset in Linux?
So I use Ubuntu-Mate and wanted ZFS for reliable data storage (day to day, not backup, just to store stuff...) I grabbed a couple of drives, installed the ZFS tools, configured the drives into a mirrored pool, created a dataset, created a mount point, mounted the ZFS dataset to it, then used CHOWN to allow me to get started saving stuff to it. With Ubuntu, one needs to be root to manage ZFS pools/ datasets, but once set up, you're back to non-root user, so don't have create/ mod privileges on the datasets. So simply changing the user who owns the mount point seems to work... The question I have, is basically am I missing something or is there a way to give my user account permissions to create / destroy data on a ZFS dataset. I saw there was a permissions to create, mount and destroy snapshots and stuff, but just simply to have permission to dump stuff that I can just save/edit etc.. not so sure...
So you are doing it directly in OS access on the same machine? I've build a dedicated NAS SERVER and installed debian inside Xenserver passed throug all disks and done. Then i was createing datasets for example /tank/Programs /tank/Games i had to CHMOD 777 (i know very bad security) to access those directories from my windows machine over samba/smb.
So in other words i had to chmod 777 Programs and Games so i could access those directories. Is this the same as chown?
Yeah, on the same machine. I figured I could have it running as a day-to-day storage, and then export/ send copies to a (yet to be set up) backup machine, and maybe from there on to Tarsnap or something... BTW, the game dataset, is that for cold storage, or do you actually load at runtime over the network?
For now i am just testing but yes my NAS will eventualy relpace hard drives in my PC. That means running games from my nas on my PC. Any problems ? BTW nice plan.
No, chown assigns a user and groups owner, chmod assigns write/read/execute permissions.
Examples: sudo chown alphazero1990:users -R -v /mountpoint set the alphazero1990 as the owner and users and groups owner. doing sudo chmod 644 -R -v /mountpoint would mean the alphazero1990 can write/read files, the group users can read and all others can read also.
Add the following parameters:
force user = alphazero1990
force group = users
in the samba share config to force a certain user on that shared folder and by that force the permissions that you setup earlier for that folder and by that you don't need to use chmod 777
If possible try to replace the samba server with a nfs server since it performs better than samba on linux.
Guys, you make a separate storage group (there should already be one normally) to regulate rights, then make member of that group. Don't attribute directly, you'll lose overview and you'll run into issues later... Ubuntu is not rolling release, you'll have to upgrade, which de facto is a reinstall that doesn't touch your storage like usual in Linux... imagine the potential for chaos lol...