
> How would I get Tomcat to save the file as "sportsfan" "tomcat"?
Run Tomcat as user "sportsfan" or "root".
--
mike morris :: mikro2nd (at) gmail (dot) com
http://mikro2nd.net/
http://mikro2nd.net/blog/planb/
http://mikro2nd.net/blog/mike/
This email is [X]bloggable [ ]ask-first [ ]private
--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/
Sent from my BlackBerry® wireless device
Hi
> Tomcat is running on our server (I think) as user "tomcat" group "tomcat".
> The date files in our web application are stored as user "sportsfan" group "tomcat".
> This is necessary so that our user uploading as "sportsfan" can FTP up and down the files,
> and Tomcat can read it.
>
> When Tomcat creates a file, it saves it as "tomcat" "tomcat", which means that FTP user
> "sportsfan" can no longer access it. How would I get Tomcat to save the file as "sportsfan" "tomcat"?
>
There are a few options here:
1) Have your code change the owner of the file after you’ve created – the UNIX/Linux command is CHOWN
2) Add the user sportsfan to the group tomcat. If the default mask of the file permissions allows sportsfan reads
& writes of the file then sportsfan will be able to read it. Otherwise you may need to change the permission to (CHMOD).
3) There’s one last, archane (but potentially useful) option. The use of the SUID and SGID permissions on the DIRECTORY (the bits mean something different on files!).
The choice of solution will depend directly on the security requirements, e.g. is the FTP server accessible via the internet? Is security a risk? You may want to change both the owner and group (CHGRP) of the file...
Gavin
Read our disclaimer at: http://www.picknpay.co.za/picknpay/content/en/disclaimer If you don't have web access, the disclaimer can be mailed to you on request. Disclaimer requests to be sent to it-se...@pnp.co.za |
--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/