Giving Access to the path /etc/init.d/

Hello I get the following error: The database has been updated but there was an error updating the service: Access to the path "/etc/init.d/TC27651718081688417868525" is denied.

How would I give the user "tcadmin" access to create files in: etc/init.d/

Your help is appreciated

Thanks, Brad
Who is Participating?
ravenplConnect With a Mentor Commented:
add the user to group root
usermod -G root tcadmin
and modify /etc/init.d/ so group root can write it
chmod g+rw /etc/init.d

now tcadmin can add/delete files from /etc/init.d
but note, that it can't modify already existent files, that were not created by him. TO allow that as well, change all existing files perms to
chmod g+rw /etc/init.d/*

NOTE: it's of course unsafe to do the above, You should rather use sudo tool
The User just needs the execute right of the directory. Since tcadmin seems not to be in the root group (which is good). Give others the right to change into the directory and read the contents: chmod o+rx /etc/init.d/
Although this should already be default.
But it seems to me, that this weird file TC... isn't existing. Have you checked its existence and rights?
addgroup initd.allow
addgroup tcadmin initd.allow
chown :inetd.allow /etc/init.d
chmod g+w /etc/init.d
mindlessactsAuthor Commented:
How would I do this with sudo? That guide was a bit confusing.

Thanks, Brad
Depends on what sudo configured to allow you to do (different Linux distributions, different rules).

Try adding "sudo" in front of each command. (No quotation marks, of course.)

Alternatively, just use "su" to become root and run the commands that way.  (Don't forget to run "exit" after you are done.)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.