I have a perl server which needs the ability to read user's files and data, and write to them. The users are authenticated via LDAP, so I can verify passwords and learn their home directory.
From here I need some way for this webserver (running as www-data
) to access their files. I've thought about running every command through su/sudo
but that's really not optimal when I just need to open/write/close/glob files in their home directories.
Is there standard practice for this? I haven't been able to turn up anything so far.
Notes
- I want the files in their home directory, as the users will be SSHing in and running other commands on them that won't be available via the web
- The web connection is made over HTTPS of course.
Related