I am creating folder/file in linux using jdk 1.4 (mkdir). I am running this code from my application using test user(limited permission). But the folder/file is creating with root permission. I need to delete these files and folders manually at later time. When i try to delete the folder/file i got access denied. The JDK is installed in root.
How can i create the folder/file with different user permission (non root) in java 1.4?
Please help me. Thanks in advance.
Your files will be created with the owner of whatever your VM runs as. If you want to run as a different user,
su - <userid>is your friend.You can eg. use the
--commandparam tomkdiryour directory.Cheers,