-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Scott,

On 7/29/13 8:36 PM, Scott Derrick wrote:
> 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.

Pesky Java 7 API. I'll have to read-up on that some time.

> 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&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!

Any idea how PosixFilePermissions works with the process's umask? What
kind of filesystem is it? What is the umask of the process?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJR9xQGAAoJEBzwKT+lPKRY8UwP/RAvdvFPWwSb5W3OsOf1Veh0
hDLXTz3vV6gTDhPwiWMnuoAZEKLEz+kcJqMeeJxt1w1+pzcnm2JOnHETr95SpXuC
X9LT2Qi3w686E2BrHjm+5ad1KN4KqXmcU0Eyh8HLPudyZwiNBMkhY8o3pLLDTEZF
4TxTzQoNSFSXsX1UcCQQM0bUYsURuvamhs8xytSa1VrTKLJUxaGFicZ+g+OVR5In
Zg5Fg/BfjWDKGYW1ILWDaVG8dwCZ+CCwOOq6kBNZaU9zaPY2TSfkC8XAiY7xvah9
noLYUsSi2yEThqcPkn9QFZcKZFw24Vu7wQwhp2NihsKWu+WqAYOhFwRXegER6lnL
k7JAuE/35+Y5V2Kxei34Ov/UW8tsuMi8c9G3B3lhBeaCT1MFMnjcpZn2LWeoXzBE
5of6TFQYmMjVhj0NJXBpThluomSkhOh9XmyWyzLcT+HmOjsAD+U30z5GrNBqFjN7
Sh4Xywrdolg8qS75mc4D6tf1vXkKYlHCM1/TOchB+8xdQPOQ+O97pDxzthKdpij7
5KuoNT/n2Zfdsuu5DVS3xjROeyst5Elwb6DNsSnAgzCjBxf8GFNniURcsoXA074t
M6IXIMnen4lA/ipvRrV0iKQz+DNkiriDi8HA4Ze2ecE9LY6ETCW5ax4x518xeFty
e8YrrK03AKUtpe9y5oWC
=OOCi
-----END PGP SIGNATURE-----

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

Reply via email to