Results 1 to 8 of 8

Thread: Write permission for USB drive

  1. #1
    Join Date
    Mar 2020
    Beans
    7

    Write permission for USB drive

    Using a distro based on Ubuntu 18.04. I recently formatted a USB drive in EXT4. I am using it for Timeshift and backing up other files that I wish to reuse when I upgrade to version. I am however unable to write to any of the available space on this drive. Ut looks like I need to configure the drive so I can write to it, but checking around online, I cannot find any information that is at my ability level. The drive is SDG2 and I have the UUID, have not been able to get past that point. Is there something I can do during the formatting that would give me write permission? Otherwise, what do I need to do. Cannot understand why the system takes ownership of this as it is my drive.

    Thanks

  2. #2
    Join Date
    May 2013
    Location
    Galiza
    Beans
    2,588
    Distro
    Ubuntu

    Re: Write permission for USB drive

    You can chown it or, likely simpler, format it with Disks.

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,307
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Write permission for USB drive

    Is the storage mounted? That doesn't happen automatically. Normally, we use fstab to mount partitions for permanent storage.
    After mounted, use chown to control the owner of the mounted directory. ext4 is a fine file system for this purpose.

    Usually backups need to be made using the root account. Access that with sudo, but doing it for GUI programs is a bad idea due to unwanted side effects. Without root/sudo, important file metadata will be lost. Linux is a multi-user system. Different accounts are part of the way the OS works. Backups need to handle that aspect.

    I don't know anything about that backup program but other tools work fine. There should be a guide for using sudo safely with it.

  4. #4
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Write permission for USB drive

    Quote Originally Posted by larryb1607 View Post
    Using a distro based on Ubuntu 18.04.
    Thread moved to Ubuntu/Debian based sub-forum.
    Ubuntu 18.04 Desktop Guide - Ubuntu 20.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,079
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Write permission for USB drive

    I would change the permissions on the mounted drive so that all users can write to it. Assuming it mounts at /media/username/drive name, then
    sudo chmod 777 /media/username/drive name
    Should do it. I would put code tags on that second line but it seems impossible with this tablet.

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,280
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Write permission for USB drive

    deleted ; see below
    Last edited by SeijiSensei; September 4th, 2020 at 08:11 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,280
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Write permission for USB drive

    Mount the device to a known location via /etc/fstab. For instance, my 4 TB outboard USB drive that I use for backups has this entry in /etc/fstab:

    Code:
    UUID=62bc0cab-e5e7-4bb3-9500-79e7e666ee27 /media/external  ext4   defaults 0 0
    I created the mount point /media/external with "sudo mkdir /media/external" before mounting the device.

    Usually you want to run backups as the root user, but I know nothing about Timeshift. If it's running under your username, then you would want to own the entire filesystem:
    Code:
    sudo chown username:username -R /media/external
    should give "username" write privileges on the mounted filesystem. If you still get denials, run
    Code:
    sudo chmod u+w -R /media/external
    Replace "/media/external" with whatever mount point you created for the filesystem. The UUID should reference a partition formatted with a filesystem like ext4. Run "sudo blkid" to make sure you have the correct UUID. For the filesystem above, blkid returns
    Code:
    /dev/sdf1: UUID="62bc0cab-e5e7-4bb3-9500-79e7e666ee27" TYPE="ext4"
    Last edited by SeijiSensei; September 4th, 2020 at 08:16 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Mar 2020
    Beans
    7

    Re: Write permission for USB drive

    Used the last suggestion by SeijiSensei. Not sure if I created a mount point or not. I was able copy the files I wanted to the USB folder I created by copying them from another place and opening the destination folder as admin.

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
  •