LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-05-2015, 09:11 PM   #1
ThomasD3
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
Question Permission different based on working directory


with RHEL, I do not understand the following:

#/etc/init.d/lighttpd start
Starting lighttpd (via systemctl): Job for lighttpd.service failed. See 'systemctl status lighttpd.service' and 'journalctl -xn' for details.
[FAILED]

(the error is about not having permission to write to lighttpd's PID file)

but if I go in the folder directly

#cd /etc/init.d
#./lighttpd start
Starting lighttpd: [ OK ]


Why could this be?
 
Old 02-06-2015, 04:06 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,342

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
You'd have to check the code in the lighttpd script (I assume its a script). Looks like it assumes/depends upon actually being in that dir when it starts.
Simplest soln is probably to add the 'cd /etc/init.d' at the top of the script.
 
Old 02-07-2015, 03:50 AM   #3
ThomasD3
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
You'd have to check the code in the lighttpd script (I assume its a script). Looks like it assumes/depends upon actually being in that dir when it starts.
Simplest soln is probably to add the 'cd /etc/init.d' at the top of the script.
I don't see an obvious place in the script where it does this assumption, but yes, you're right, doing a CD in it will just make it work.

thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you like permission based schemes when installing apps? LuksFormat Linux - Mobile 18 12-31-2013 01:57 PM
find: failed to restore initial working directory: Permission denied fachhoch@gmail.com Linux - Newbie 3 05-10-2012 02:18 PM
recursively list files and dirs based on permission sneakyimp Linux - Software 2 10-16-2007 06:37 PM
Automatically changing the user's group based on working directory sleeping Linux - General 5 03-12-2007 01:28 PM
is there a cp or alike that you can use based on permission flags? rcorkum Slackware 1 11-15-2006 05:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration