What is add_file?

troudee

Explorer
Joined
Mar 26, 2020
Messages
69
I am struggling with understanding the ACL permission add_file of ZFS.

This page (and all others that I've found so far) lists the add_file ACL access privilege as "Permission to add a new file to a directory."

Does "adding" a file to a directory only include the file as empty file, or could "adding" include actual content of the file?

For example, when a user only has the add_file permission in the directory /archives, can he/she only do

Code:
touch /archives/thisFileSurelyDoesNotExistYet-380989.txt


? Or would it be allowed to create a file with content as well, like echoing to a new file

Code:
echo "Hello, this is my file, and I cannot do anything with it after I created it, cool huh?" > /archives/newFile-423122.txt


or copying

Code:
cp /home/troudee/current-testament.txt /archives/testament-2020-01-01.txt


?
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
why don't you test this ?
 

troudee

Explorer
Joined
Mar 26, 2020
Messages
69
why don't you test this ?
I do not have an installation yet, only an mfsbsd live cd, and somehow I cannot even set that ACL.
Do you happen to have a link where setfacl under FreeBSD on ZFS is described? (Or anything else but setfacl; on some pages I saw chmod, but that chokes on all of my tries as well)
 

troudee

Explorer
Joined
Mar 26, 2020
Messages
69
Wait a second, is the permission add_file even implemented in FreeBSD's ZFS?
 
Top