we are having a problem with our recently installed web app.
It allows users to upload files and save them to a directory in the OS. We’ve asked the Security guys to add the websphere user to the target path group, and this path has 770 permissions.
That should do it, if we log in to the machine with the websphere user, we can create folders and files in that path; but our java web app can´t create a directory and it fails.
Unfortunately no exception is thrown, the failing method first checks for this the existence of this directory with File.isDirectory() if it returns false, then it tries to create it with File.mkdirs().
The directory is not created and so a custom error message is displayed to the user. No other clue in the logs.
I’ve tried to reproduce the problem in my local linux laptop and toying with users and groups, i’ve seen that changes to permissions do not take effect until a new session is started, but i’m not sure how that affects our deployed java web app and what needs to be done for permissions to be effective.
I’m also sure the files are written with websphere user, since the app has written some files in a different path.
Has anyone faced something similar?
thanks
chown seems to be a solution.
UPDATE:
Another solution is to check the ‘file permission policy‘ for the java client (see).
I hope it helps you.