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

Thread: Problem with second drive; permission denied

  1. #1
    Join Date
    Feb 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Problem with second drive; permission denied

    I recently set up a 2nd IDE drive to auto-mount. Seems to mount just fine. I have it under /media. But then I try to move or copy files (in this case Document 1) to it and I get the following error message:

    Error opening file '/media/Drive-b/Unsaved Document 1': Permission denied

    What do I need to change so I can use the drive ?

    (currently running Lucid Lynx 10.04)

  2. #2
    Join Date
    Apr 2010
    Location
    Midwest
    Beans
    109
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Problem with second drive; permission denied

    deleted
    Last edited by Clever_Username; September 27th, 2010 at 03:40 AM. Reason: delete

  3. #3
    Join Date
    Feb 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Problem with second drive; permission denied

    You wrote .... "Can you post an ls -l on the file your trying to move?"

    What does that mean ? How do I "post an ls -l" on a file ?

    Note, I also tried moving another file to the drive and got the same permission denied message.

  4. #4
    Join Date
    May 2006
    Location
    Saskatoon, SK, Canada
    Beans
    178
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Problem with second drive; permission denied

    Open Terminal (Applications > Accessories > Terminal) and type
    Code:
    ls -l /media
    Copy and paste the results here.

  5. #5
    Join Date
    Feb 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Problem with second drive; permission denied

    Thanks for helping SentimentFluid. Here's the results:


    eric@desktop:~$ ls -l /media
    total 8
    drwxr-xr-x 3 root root 4096 2010-09-25 09:44 Drive-b
    lrwxrwxrwx 1 root root 7 2010-08-08 15:33 floppy -> floppy0
    drwxr-xr-x 2 root root 4096 2010-08-08 15:33 floppy0

  6. #6
    Join Date
    Apr 2010
    Location
    PNW on E-side Cascades
    Beans
    363
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problem with second drive; permission denied

    Go to your /home/username/ directory in the original or first drive and, in terminal, do as the man from Saskatoon said and enter the command < ls -al >. The ownerships here are what you want on the second drive, too.

    Say your username is joe. you do a < ls -al > in your home directory and it says ownership is joe:joe , like below

    PHP Code:
    drwxr-xr-x  2  joe  joe   4096  Aug 29 16:29 Pictures 
    So, the command < chown > is necessary to do this.

    So, go to /media/devicename/home/ and do the following, quick and dirty access

    chown -R joe:joe username/*
    Last edited by sidzen; September 27th, 2010 at 05:24 AM. Reason: IT WORKS, of course you might have to use sudo
    Nonsense is an assertion of man's spiritual freedom in spite of all the oppressions of circumstance-- Aldous Huxley
    The real power of Linux lies in the command line

  7. #7
    Join Date
    Sep 2010
    Beans
    22

    Re: Problem with second drive; permission denied

    Go look at the properties of the mounted filesystem on /media. If it is a Linux Native partition(s), fine, its a permissions problem alone, but if the filesystem is NTFS or some other foreign type, there could be additional issues. If an NTFS filesystem (Created by Windows ) is corrupt Linux will usually not be able to fix it. and it will be mounted read-only. You will need to use Windows to repair it, sometimes just needing to boot into Windows once, and the filesystem will come back under Linux read/write. At the command line under Linux a 'mount' command will show you how it is mounted, the 'df' command gives less, but it least it will tell you which partition goes with which mount point. Be sure the file system is mounted has the type and mount point you expect.
    Last edited by bsalem; September 27th, 2010 at 08:41 PM.

  8. #8
    Join Date
    Apr 2007
    Location
    South Carolina
    Beans
    889
    Distro
    Ubuntu Studio 16.04 Xenial Xerus

    Re: Problem with second drive; permission denied

    It looks like only root has permission to write to Drive-b.
    If you're using the terminal try using sudo in front of the command & see if that works.
    Code:
    sudo cp /media/Dirve-b/location-to-filename /location-to-new-filename
    Gary

    A wise man knows what he doesn't know.

  9. #9
    Join Date
    Feb 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Angry Re: Problem with second drive; permission denied

    I tried the solution by Gary (but fixed the text so it read Drive-b, not Dirve-b). So the exact command I used is:

    sudo cp /media/Drive-b/location-to-filename /location-to-new-filename

    I got the following message back

    cp: cannot stat `/media/Drive-b/location-to-filename': No such file or directory

    What does this mean ? And more importantly, what do I try next ?

  10. #10
    Join Date
    Apr 2007
    Location
    South Carolina
    Beans
    889
    Distro
    Ubuntu Studio 16.04 Xenial Xerus

    Re: Problem with second drive; permission denied

    Are you typing the same command that you originally typed that gave you the permissions error but with sudo in front of it?
    The cannot stat error is usually from a command that can't be executed like on a file not found or a partition not mounted.
    Try this to check & make sure Drive-b is really mounted first:
    Code:
    mount
    Then try the original command that gave the permissions error with sudo in front of it. See what if any errors you get. I'm assuming you have an NTFS partition & they can be tricky sometimes. You might have to edit your /etc/fstab file to get it working.
    good luck
    Gary

    A wise man knows what he doesn't know.

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
  •