user home folder setup

sdiaz3 2 years ago updated 2 years ago 4

I have an nfs mount with pictures. I want users to be able to read all the folders but only upload to a specific folder. How do I accomplish that? My existing folder structure is /pics/YYYY-MM and pics/incoming for unsorted pictures that will be eventually sorted into their year-month folders.

Also, on a related note I cant seem to create a home directory on an nfs mount. It says:


Invalid folder!/srv/share/services/filerun/superuser

The folder "/srv/share/services" does not exists or it is not accessible by PHP.


/srv/share/services/filerun$ ls -la
total 24
drwxrwsr-x 3 www-data www-data 4096 Dec 20 03:45 .
drwxrwsr-x 3 www-data www-data 4096 Dec 20 02:43 ..
drwxr-sr-x 2 www-data www-data 4096 Dec 20 03:45 superuser

Given that user permissions, the ones you set when you create or edit a user account, are general, you would need to use the folder sharing system, for achieving what you have described.

You can configure the user accounts without a home folder, and share the two folders from a different FileRun account that has full access to the entire file repository (usually the superuser account). When sharing folders you have the option to give or not upload permissions.

I cant seem to create a home directory on an nfs mount

I would check the permissions of the entire path, as "www-data" would need access to each parent folder in order to browse to the end folder.

Ok i'll try the folder sharing thing.

Regarding the permissions of the entire path... the /srv is owned by root and /share is owned by another user. Why would www-data need access to those? I want to make sure it doesn't have access to those!

To be able to traverse a folder, the system user needs the execute permissions on all folders that make that path. I wasn't referring to read or write  permission. Given the mix of folder ownership it's easy to miss a folder's permission.

okay makes sense. I did have execute permission. But I chmod +x anyhow. And filerun took it. But then I relogged into filerun and it gave me the same errors.

I think I'm in some wierd NFS ACL pergatory as filerun indicates the problem starts on the top folder being mounted. Going to go read up on that and step up my nfs game. Thanks for the help though!