Results 1 to 5 of 5

Thread: How do I unzip a folder with sudo to place it in rooted folders, or move the file

  1. #1
    Join Date
    Jan 2015
    Beans
    3

    How do I unzip a folder with sudo to place it in rooted folders, or move the file

    Or how do I move the files, and what about setting them to root access only again?

    In order to presumably install phpmyadmin on Ubuntu 14.04, a suggestion was made for me to unzip a folder in the system folders that require root access:

    http://www.phpmyadmin.net/home_page/index.php

    Download phpMyAdmin from here, unzip, copy all files to /var/www/html/phpmyadmin/
    I experimented with sudo mv, but I couldn't get to go.

    I do not know how to do this. I am rather inexperienced with terminal, and have only used the commands i have used.

    (apache2 is giving me a syntax error of there not being a conf file that there is supposed to be)

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do I unzip a folder with sudo to place it in rooted folders, or move the file

    Welcome to the forums.

    Understanding UNIX processes and permissions is a key thing for system security. I don't think there is any shortcut. Learning it now will save you days, weeks, months of frustration. It all makes sense, really. Trust me.

    So - how to get the background so you are prepared to learn the file and directory permissions model?
    http://blog.jdpfu.com/2014/12/28/learning-linux has recommended reading, in order. Google only provides answers, but some level of background is required to understand those properly and no trash a system. Blindly running chmod commands can be extremely dangerous. So, please spend a few hours reading.

    Lastly, if you want exact help, please provide exact directories and files with all permissions shown. ls -la is the command for that.

  3. #3
    Join Date
    Jan 2015
    Beans
    3

    Re: How do I unzip a folder with sudo to place it in rooted folders, or move the file

    I hadn't seen that article, thanks. Also, the following reply at a different forum was quick and to the point, I can use:

    sudo nautilus.

  4. #4
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: How do I unzip a folder with sudo to place it in rooted folders, or move the file

    Quote Originally Posted by hspecimen View Post
    I hadn't seen that article, thanks. Also, the following reply at a different forum was quick and to the point, I can use:
    Please be careful about starting graphical applications with sudo: https://help.ubuntu.com/community/Ro...Graphical_sudo

    It might be safer to unzip the file into a directory in your home folder, and if that works without problems (what if the downloaded zip file is corrupted?) you can copy the files you need to where they need to be, taking care of permissions as required.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do I unzip a folder with sudo to place it in rooted folders, or move the file

    Quote Originally Posted by lisati View Post
    Please be careful about starting graphical applications with sudo.
    +100! - that's a way to trade 1 problem for many others.

    I recall when I was new to UNIX and file permissions were a hassle. Using root to do stuff seemed to make it all work (sudo wasn't popular), but my system was hacked a month later in just a few minutes of connection time. This was with dial-up internet and I'd connected to a government lab modem pool where I worked. 20 min and my Linux machine was completely owned.

    Be careful. Very careful. Using sudo with graphical programs can create settings in files that aren't owned by your account, so the next time you run that program, it either doesn't work at all or your settings won't save. Plus, some very important environment variables aren't changed, so there are likely to be other difficulties.

    It really is best to learn file and directory permissions and how using groups lets you have the access needed, but without going back to brute force (i.e. using sudo all the time).

Tags for this Thread

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
  •