Announcement

Collapse
No announcement yet.

Changing directory ownership

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing directory ownership

    Hello, Everyone.

    How do I change directory ownership from root to me?

    I have PHP installed on my system. When I installed it I installed it as sudo I think. It went into the /opt directory. Most, if not everything, now has root as owner, and I can't write to those directories.

    Your help is greatly appreciated.

    Regards,
    theAdmiral

    #2
    Re: Changing directory ownership

    Originally posted by theAdmiral
    How do I change directory ownership from root to me?
    To answer your question (but do read the note below), you can change file/directory ownerships with the 'chown' command (see man chown for syntax...and use sudo when needed) or by starting dolphin "as root" with 'kdesudo dolphin'

    NOTE: Be absolutely sure you know what you're doing, changing ownership/permissions of system files/directories (basically everything outside your home directory) is usually not the correct thing to do (and may result in decreased security and/or system errors).

    Basically everything you need write access to as a normal user (with a few exceptions) should go inside your home directory. And when you need to edit something you don't have write access to, use sudo (or the aforementioned 'kdesudo dolphin') to get root privileges.

    Comment


      #3
      Re: Changing directory ownership

      USE Sudo Before Every Command

      Comment


        #4
        Re: Changing directory ownership

        Originally posted by ssj6akshat
        USE Sudo Before Every Command
        That's a very dangerous suggestion! Only use sudo when it's absolutely necesary.

        Comment


          #5
          Re: Changing directory ownership

          Originally posted by theAdmiral

          ... I can't write to those directories.
          As a user, you should not need to write to directories outside of /home/theAdmiral, except for data storage partitions. If packages, such as OpenOffice, have been installed in /opt, that should not preclude the user from running the package, but data saves need to be in the user's folder or data partitions, not back in /opt or elsewhere in the system.

          Comment

          Working...
          X