Log rotate doesn't work very well.
So, when i execute command, I got a below error first time.
$ logrotate /etc/logrotate.d/systemname
error: error creating output file /var/lib/logrotate/logrotate.status.tmp: Permission denied
then i changed /var/lib/logrotate/ to 666
Error message change like below.
$ logrotate -f /etc/logrotate.d/systemname
error: error stat()ing state file /var/lib/logrotate/logrotate.status: Permission denied
Help me, how to solve this problem?
thanks.
I am assuming that you tried to run logrotate as unprivileged user ($ in the prompt), so you had no permissions for /var/lib/logrotate/.
Related
I am setting up a spring boot application and when running it, it should generate a folder in the source directory (see step 3: https://www.baeldung.com/spring-boot-h2-database)
But when running the application I receive the following error:
org.h2.message.DbException: Log file error: "/data/sample.trace.db", cause: "org.h2.message.DbException: Error while creating file ""/data"" [90062-200]" [90034-200]
at org.h2.message.DbException.get(DbException.java:194)
at org.h2.message.TraceSystem.logWritingError(TraceSystem.java:294)
at org.h2.message.TraceSystem.openWriter(TraceSystem.java:315)
at org.h2.message.TraceSystem.writeFile(TraceSystem.java:263)
at org.h2.message.TraceSystem.write(TraceSystem.java:247)
at org.h2.message.Trace.error(Trace.java:194)
it seems to be a permission problem but I do not understand why. My current user, has admin permissons. What am I missing here?
When I encounter this problem on my machine I proceed through following steps:
If I don't know what user & group I am right now: $whoami && groups
What user is the program executed with (I'm not into Java so eg. PHP "echo exec('whoami');")
Who has access to the directory: $ls -la
3.1 If only owner has access and you are not the owner: $chown user:group file
3.2 If group and owner should have access consider: $chmod 770 file
I have created one .sh which contains java command required to run the tesng.XML file when I run this test.sh file on Jenkins it shows me permission denied error.
Jenkins console output:
Building in workspace /home/dev2/eclipse-workspace/weeklytask
[weeklytask] $ /bin/sh -xe /tmp/jenkins7439378074963422991.sh
+ ./test.sh
[TestNG] Running:
/home/dev2/eclipse-workspace/weeklytask/enquiryreminder.xml
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 8120
Only local connections are allowed.
FOLLOW UP REMINDER CRON WEEKLY CHECK TESTCASE FAILED
PLEASE CHECK THE TIME INTERVAL SETTING
SET THE TIME INTERVAL TO 600
FOLLOW UP REMINDER CRON WEEKLY CHECK TESTCASE FAILED
PLEASE CHECK THE TIME INTERVAL SETTING
SET THE TIME INTERVAL TO 600
[[Utils]] Error while writing to /home/dev2/eclipse-workspace/weeklytask/test-output/Suite/Test.html: /home/dev2/eclipse-workspace/weeklytask/test-output/Suite/Test.html (**Permission denied**)
[[Utils]] Error while writing to /home/dev2/eclipse-workspace/weeklytask/test-output/Suite/Test.xml: /home/dev2/eclipse-workspace/weeklytask/test-output/Suite/Test.xml (Permission denied)
===============================================
Suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================
[[Utils]] Error while writing to test-output/junitreports/TEST-verify.enquiryremindertest.xml: test-output/junitreports/TEST-verify.enquiryremindertest.xml (Permission denied)
Jenkins use the user jenkins. If you have created your file with other user, there might be permission issue on the file. To resolve change the permission on the files and allow other users to execute the script. You can use
chmod +x test.sh
The directory eclipse-workspace belongs to dev2 user and here jenkins user is trying to write data in it. Give jenkins write permission on this folder. try
sudo chmod -R a+rw /home/dev2/eclipse-workspace
For more details about permission you can view This tutorial
I am trying to compile the alignment program AQUA with a .tcl script. I have compiled the programs and set the environmental variables in the .tcl file but I am still getting the following error;
tclsh AQUA.tcl mtDNA.fas
stderr couldn't execute "/home/shump/AQUA/muscle": permission denied
couldn't execute "/home/shump/AQUA/rascal": permission denied
couldn't execute "/home/shump/AQUA/normd": permission denied
One normd file does not exists yet (mtDNA.fas.muscle.normd), full stop
If anyone could put me in the right direction to solve this issue, I would appreciate it.
P
Most likely you need to set the execute bit permission on the files mentioned, using:
chmod +x /home/shump/AQUA/muscle /home/shump/AQUA/rascal /home/shump/AQUA/normd
I'm setting up the Puppet Dashboard for the first time. I have it running with the passenger module in Apache.
sudo rake RAILS_ENV=production reports:import
When I run this command, the tasks appear in the dashboard as failed.
630 new failed tasks
The details for each failure look something like this:
Importing report 201212270754.yaml at 2012-12-27 09:21 UTC
Permission denied - /var/lib/puppet/reports/rb-db1/201212270754.yaml
Backtrace
/usr/share/puppet-dashboard/app/models/report.rb:86:in `read'
/usr/share/puppet-dashboard/app/models/report.rb:86:in `create_from_yaml_file'
The report files were owned by puppet:puppet with a 640 permission by default.
I ran chmod a+rw on the reports directory, but I still get the same errors.
Any ideas on what I might be doing wrong here?
If you are running the puppet-dashboard server as root instead of as the puppet-dashboard user, you will see this error. My system is using /usr/share/puppet-dashboard/script/server on centos 6.4 using the puppet-dashboard-1.2.23-1.el6.noarch rpm from puppetlabs.
[root#hadoop01 puppet-dashboard]# cat /etc/sysconfig/puppet-dashboard
#
# path to where you installed puppet dashboard
#
DASHBOARD_HOME=/usr/share/puppet-dashboard
#DASHBOARD_USER=puppet-dashboard
DASHBOARD_USER=root
DASHBOARD_RUBY=/usr/bin/ruby
DASHBOARD_ENVIRONMENT=production
DASHBOARD_IFACE=0.0.0.0
DASHBOARD_PORT=3000
edit the file like above and then run the command
/etc/init.d/puppet-dashboard restart && /etc/init.d/puppet-dashboard-workers restart
my puppet-dashboard version is 1.2.23
Today I tried to my USVN on http://192.168.1.2/usvn/ but unfotunately I get this shocking message !!!
Zend_Session::start() - /var/www/usvn/library/Zend/Session.php(Line:438): Error #2 session_start(): open(/var/lib/php5/sess_o58dtec91alc8r5q8821to20h0, O_RDWR) failed: Permission denied (13) Array /var/www/usvn/library/Zend/Session.php(Line:442): Error #2 session_write_close(): open(/var/lib/php5/sess_o58dtec91alc8r5q8821to20h0, O_RDWR) failed: Permission denied (13) Array /var/www/usvn/library/Zend/Session.php(Line:442): Error #2 session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) Array
Trace:
/var/www/usvn/library/Zend/Session/Namespace.php:124 Zend_Session::start
/var/www/usvn/library/Zend/Auth/Storage/Session.php:87 Zend_Session_Namespace::__construct
/var/www/usvn/library/Zend/Auth.php:91 Zend_Auth_Storage_Session::__construct
/var/www/usvn/library/Zend/Auth.php:143 Zend_Auth::getStorage
/var/www/usvn/library/USVN/Controller.php:83 Zend_Auth::getIdentity
/var/www/usvn/library/Zend/Controller/Action.php:492 USVN_Controller::preDispatch
/var/www/usvn/library/Zend/Controller/Dispatcher/Standard.php:285 Zend_Controller_Action::dispatch
/var/www/usvn/library/Zend/Controller/Front.php:934 Zend_Controller_Dispatcher_Standard::dispatch
/var/www/usvn/public/index.php:5 Zend_Controller_Front::dispatch
So Can you please help!
Your apache/php installation is not able to write files in the session.save_path.
Make sure that the user under which apache runs has permissions to read and write in /var/lib/php5/.
Normally in every apache installation this should be true by default unless you messed up something with permissions.
After fixing that you're likely to encounter the same issue for usvn repository path. So keep that in mind. The php/apache user is NOT your shell user, so you should check for that user permissions, usually it's www-data or apache.