Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: administrator user has restricted access to files

  1. #1
    Join Date
    May 2007
    Beans
    408
    Distro
    Ubuntu 20.04 Focal Fossa

    administrator user has restricted access to files

    Using Ubuntu 12.04 LTS I constantly have problems with restricted access to certain files and folders. I am logged in with a user account listed as "administrator" but I am not able to copy anything from the home folder to, lets say /usr/share/apps in order to do that I need to start gnome commander as "administrator".
    Is this problem by design or do I have to change something in my user account?

  2. #2
    Join Date
    Dec 2007
    Beans
    562

    Re: administrator user has restricted access to files

    It's not a problem. It requires elevated privileges so that you don't bork your system unknowingly, even while using an "administrator" account. If you want to be able to mess with your system without being prompted for permission, use root. Just make sure that if you use root, you know exactly what you're doing and make sure you back up all your stuff. Running rm as root is very unforgiving.

  3. #3
    Join Date
    May 2007
    Beans
    408
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: administrator user has restricted access to files

    Well, if I am logged in to my normal "administrator" account, have Nautilus open and want to copy a file from A to B then I might get the message "access denied". Then I either have to open Gnome Commander and start as root or I have to open Nautilus from the command line as root.

    My question was: is this meant to be the case that an "administrator user" cannot copy files to lets say /usr/share/application (e.g. an application launcher for a java application) other than using the terminal or login as root.

  4. #4
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: administrator user has restricted access to files

    Even in the admin group, a user wont be able to change system files without escalating first to admin privileges.
    https://help.ubuntu.com/community/RootSudo
    http://ubuntuforums.org/showthread.php?t=1486138

    This is part of the security of a Linux system. Please read carefully the above links.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  5. #5
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: administrator user has restricted access to files

    Quote Originally Posted by DrScum View Post
    My question was: is this meant to be the case that an "administrator user" cannot copy files to lets say /usr/share/application (e.g. an application launcher for a java application) other than using the terminal or login as root.

    that is correct and as it should be. user in administrator group can temporarily become root by runnign sudo (or gksu for GUI applications). But he is not actually the admininstrator (root).

    reason is not just to prevent you borking the OS. the main reson is that for the same reason user can not just change those files without passowrd that malware also needs to get your password in order to change your system files.


    after seting up the computer the root password is rarely used. mostly only for updates.
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Full disk backup (newer kernel -> suitable for newer PC): Clonezilla
    User friendly full disk backup: Rescuezilla

  6. #6
    Join Date
    Aug 2012
    Beans
    13

    Re: administrator user has restricted access to files

    The sudo command should fix your issue i think as stated above.
    example copy action:

    sudo cp /home/DrScum/<file-name> /usr/share/apps/

    The sudo in this escalates your rights temporarily for the copy action.

  7. #7
    Join Date
    Dec 2009
    Beans
    6,776

    Re: administrator user has restricted access to files

    I am logged in with a user account listed as "administrator" but I am not able to copy anything from the home folder to, lets say /usr/share/apps in order to do that I need to start gnome commander as "administrator".
    Is this problem by design or do I have to change something in my user account?
    It is by design. In fact the developers at Gnome don't even want you to use Nautilus as root ( gksu ) From the following bug report: https://bugzilla.gnome.org/show_bug.cgi?id=654184
    You shouldn't run nautilus as root. Whats probably happening here is that not
    only is nautilus getting started, but also a session bus for root, and diverse
    session services, etc etc.
    I find the "Whats probably happening" phrase a little disconcerting. You're the developer. You're not sure how it works?

  8. #8
    Join Date
    May 2007
    Beans
    408
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: administrator user has restricted access to files

    Thanks for all the replies. I do know about the sudo command I didn't know about the gksu command. These are terminal commands however and I am a complete GUI person (shame on me, I know). I was just afraid that there is something wrong with my user account. From the replies I take it that the inconveniences I was facing are the result of the safety measures built into Ubuntu and that I'll have to live with them. I guess I'll give the thread a "solved" status then.

  9. #9
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: administrator user has restricted access to files

    Quote Originally Posted by Morbius1 View Post
    It is by design. In fact the developers at Gnome don't even want you to use Nautilus as root ( gksu ) From the following bug report: https://bugzilla.gnome.org/show_bug.cgi?id=654184
    The GUI uses the users home directory for configuration variables. Using sudo or gksudo makes the user root for the session. This means the environmental variables for root are used. The logged in users configuration is different than the roots. Most of the unexpected results using gksudo vs sudo usually do to these environmental variable problems.

    I find the "Whats probably happening" phrase a little disconcerting. You're the developer. You're not sure how it works?
    More likely due to the developer not being able to confirm the specific environmental state; don't you think? Sarcasm?


    @DrScum, From the GUI you can always open a command line for a single command using alt+cntl+f2. A more consistent arrangement would be to assign the proper permissions and ownership of the directories you wish to store data in. There is no reason you can't store data outside of your home directory, but you should set that up first.
    -BAB1

  10. #10
    Join Date
    May 2007
    Beans
    408
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: administrator user has restricted access to files

    @bab1 I guess you meant alt+F2 since alt+ctrl+F2 would drop me to a terminal wouldn't it?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •