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

Posted on 2007-08-03
Last Modified: 2013-11-05
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
Question by:mindlessacts
    LVL 43

    Accepted Solution

    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
    LVL 3

    Expert Comment

    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?
    LVL 3

    Expert Comment

    addgroup initd.allow
    addgroup tcadmin initd.allow
    chown :inetd.allow /etc/init.d
    chmod g+w /etc/init.d

    Author Comment

    How would I do this with sudo? That guide was a bit confusing.

    Thanks, Brad
    LVL 3

    Expert Comment

    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.)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now