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

Thread: Can't move a file from 1 folder to another

  1. #1
    Join Date
    Apr 2006
    Beans
    8

    Unhappy Can't move a file from 1 folder to another

    Hi all, I am playing around in ubuntu trying to learn linux. I was following a tutorial.

    https://help.ubuntu.com/community/CompilingEasyHowTo

    It was going fine until I got to this part, "you should move it into the /usr/local/src directory we made in Step 1 ". Well that's the easiest part yet, I thought... After an hour I gave up!

    I tried copying and pasting about 30 times but the paste button was always greyed out. I opened another instance of the file browser and tried to drag and drop and I got a message that I lacked sufficent permissions. I even tried to redownload it to the right folder and that didn't work.

    Very frustrating that I am unable to do something so simple.

    I'm using Ubuntu 12.10.

  2. #2
    Join Date
    May 2010
    Location
    Groningen, Holland
    Beans
    109
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Can't move a file from 1 folder to another

    /usr/local/src is owned by root. This makes it impossible for your regular user to write to that folder.
    sudo chown $USER /usr/local/src
    Should do the trick.

    That said, you could just compile in a directory in your home folder.

  3. #3
    Join Date
    Sep 2008
    Location
    Vienna, Austria
    Beans
    166
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't move a file from 1 folder to another

    Quote Originally Posted by checkmate110 View Post
    Hi all, I am playing around in ubuntu trying to learn linux. I was following a tutorial.

    https://help.ubuntu.com/community/CompilingEasyHowTo

    It was going fine until I got to this part, "you should move it into the /usr/local/src directory we made in Step 1 ". Well that's the easiest part yet, I thought... After an hour I gave up!

    I tried copying and pasting about 30 times but the paste button was always greyed out. I opened another instance of the file browser and tried to drag and drop and I got a message that I lacked sufficent permissions. I even tried to redownload it to the right folder and that didn't work.

    Very frustrating that I am unable to do something so simple.

    I'm using Ubuntu 12.10.
    Learning is OK unless it mess with your system files. And the very reason why you are not able to move files because these are system files which can be moved only through "root" account. though you may copy it by using 'sudo' command. But be careful.
    "Our duty is to encourage every one in his struggle to live up to his own highest idea, and strive at the same time to make the ideal as near as possible to the Truth." -- Swami Vivekanand

  4. #4
    Join Date
    Apr 2006
    Beans
    8

    Re: Can't move a file from 1 folder to another

    Quote Originally Posted by Nr90 View Post
    /usr/local/src is owned by root. This makes it impossible for your regular user to write to that folder.
    sudo chown $USER /usr/local/src
    Should do the trick.

    That said, you could just compile in a directory in your home folder.
    Nr90,thanks for the quick response.

    I tried what you said but it's the same situation. Do I have to use the command line to move files around?

    Like I said the intent here is just to learn linux (for now).

    Is this kind of permission lockdown unuque to ubuntu?

  5. #5
    Join Date
    Apr 2011
    Location
    Victoria/Vancouver, BC
    Beans
    91
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't move a file from 1 folder to another

    use nautilus as root. to do so you can do it in a few ways.

    1) press alt+f2 then enter "sudo nautilus"

    or

    2) open terminal, ctrl+alt+t, type in "sudo nautilus"

    Now you should be able to copy into directories that are owned by root.

    I prefer the terminal way as any debug/error output will be shown in terminal as you use nautilus.

  6. #6
    Join Date
    Nov 2010
    Location
    Chesapeake Bay
    Beans
    119
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't move a file from 1 folder to another

    Is this kind of permission lockdown unuque to ubuntu?
    No, this is common throughout the *nix universe including all versions of linux.

    Some other ways are to use sudo nautilus /usr/local/src to enable write permissions in a gui, or sudo mv /folder/file /usr/local/src

    But be careful with your system files, it's best to learn where you can be confident you won't break anything.

  7. #7
    Join Date
    May 2010
    Location
    Groningen, Holland
    Beans
    109
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Can't move a file from 1 folder to another

    I would just compile in a different directory. Any folder in your home directory will have the right permissions and you won't have to screw around with ownership.

    This owner ship is not specific to Ubuntu. In linux/unix all files have associated permissions.
    Windows has this as well, but the distinction between administrator and regular user is not as clear as in linux/unix.

  8. #8
    Join Date
    Apr 2006
    Beans
    8

    Re: Can't move a file from 1 folder to another

    Quote Originally Posted by frank604 View Post
    use nautilus as root. to do so you can do it in a few ways.

    1) press alt+f2 then enter "sudo nautilus"

    or

    2) open terminal, ctrl+alt+t, type in "sudo nautilus"

    Now you should be able to copy into directories that are owned by root.

    I prefer the terminal way as any debug/error output will be shown in terminal as you use nautilus.
    frank604, this what I got.


    jeff@VMmain:~$ sudo nautilus
    [sudo] password for jeff:
    Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
    Please ask your system administrator to enable user sharing.

    jeff@VMmain:~$

  9. #9
    Join Date
    May 2010
    Location
    Groningen, Holland
    Beans
    109
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Can't move a file from 1 folder to another

    The proper way to call graphical programs as root from the terminal is gksu nautilus.
    Have a look here: https://help.ubuntu.com/community/Ro...Graphical_sudo

    That said moving the files as root will only help you here, but you won't be able to compile later unless you compile as root.

  10. #10
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,821
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't move a file from 1 folder to another

    Quote Originally Posted by Nr90 View Post
    /usr/local/src is owned by root. This makes it impossible for your regular user to write to that folder.
    sudo chown $USER /usr/local/src
    Should do the trick.

    That said, you could just compile in a directory in your home folder.
    /usr/local is meant for non-standard stuff, so you won't break your system by changing things there. By default it just contains a few almost empty directories. In general however it is recommendable not to change ownership of anything in the sytem directories.

    /usr/local/src is typically used as archive for source code of programs manually installed in /usr/local/bin. For most people (especially beginners) /usr/local/src will be empty.

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
  •