I am using tomcat7, on centOS6

The app crates a folder, uploads a file to the folder,  processes the file
and then provides a download link to the resulting file.  All this works
fine on a tomcat7 server running on my desktop machine.
Running tomcat7 on the server, its broke. 

I create the folder, OK.
I upload the file, OK
I run the first process, NOT!

I've tracked it down the permissions on the created folders.  They don't
have write access on the group, so the write fails.  If I manually change
the permission to 0760 it works fine.  
I specify write permissions when I create the folder but it doesn't get set.
Its always drwxr-x---
My code in the servlet is 

*/Path imagePath = Paths.get(baseDir, user, Accession, Accession);
Set<PosixFilePermission> perms =
PosixFilePermissions.fromString("rwxrwxr--");           
FileAttribute<Set&amp;lt;PosixFilePermission>> attr =
PosixFilePermissions.asFileAttribute(perms);
Files.createDirectory(imagePath.toAbsolutePath(), attr);/
*
The permissions must be overridden somewhere.  If I apply a more restrictive
permission, say 0600, that gets set correctly., I can't seem to set the
group permission to writable.

Any ideas!  I've been banging on this for hours! 

thanks,

Scott




--
View this message in context: 
http://tomcat.10.x6.nabble.com/Controlling-permissions-when-creating-directories-tp5002328.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to