Hi All,
I recently wrote a filebrowser portlet. It allows users to create/modify/delete files in their home directory. Right now the filemanager (Tomcat) is being run as root (for testing). When a user creates a new file via the filebrowser, it is initially created as root and then chown action is done on the new file to the corresponding user.
We want to avoid running the Tomcat instance as root. So I will not able to perform chown action. Is there anyway, to switch user inside the program and manipulate the files. The user credentials are stored in Active Directory. Please keep in mind that users will use other modes like remote shell to edit the same files.