How to give a program access to make file in root directory
5,754
If opening the application as root doesn't work (sudo app_name), then you can change the ownership of that folder like:
sudo chown user:user /usr/src/logFiles
sudo chmod +r+w -R /usr/src/logFiles
(change user:user with your username)
Related videos on Youtube
Author by
deadman
Updated on September 18, 2022Comments
-
deadman over 1 year
i am running a program which uses log4j.The log4j uses rolling file appender.However its not able to create the file.
I guess its because the creation of file need root access.
The program is running in folder /usr/src/hell0/myProgram and the log file needs to be stored in /usr/src/logFiles/myprogram.log.
But its not storing it there instead its putting everything to system out