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

Thread: Folder is not writable by user root

  1. #1
    Join Date
    Oct 2018
    Beans
    8

    Folder is not writable by user root

    I've recently installed Radarr on Ubuntu 18.04. It has 5 internal Hard drives but drive1 seems to be giving me a lot of issues. I have all drives mounted to /home/ as
    /home/drive1/
    /home/drive2/ Etc
    When I go to add /home/drive1/Movies folder using the bulk importer I get the error "Folder is not writable by user root"
    All other drivers are working just fine in Radarr and Sonnar, just not this one.
    When using sudo chown -R server:server /home/drive1/ I get
    chown: changing ownership of '/home/drive1/': Read-only file system
    And when using sudo chmod 777 /home/drive/ I get
    chmod: changing permissions of '/home/drive1/': Read-only file system



    Using the 'Disks' tool I ran a check on the drive and it checked fine. The mount options are nosuid,nodev,nofail,x-gvfs-show which match all of the other drives.

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

    Re: Folder is not writable by user root

    Which file system do each have?
    Where the file systems shutdown cleanly? Linux will mount read-only unclean file systems as a way to protect them from further damage.
    gfvs mounts are slow. Best avoided except for quick, temporary uses.

  3. #3
    Join Date
    Oct 2018
    Beans
    8

    Re: Folder is not writable by user root

    All of the drives except the one giving me issues show as NTFS/exFAT/HPFS under partition type. The drive giving issues shows as basic data for partition type and NTFS under contents. The drive were previously used under Windows 10.

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

    Re: Folder is not writable by user root

    Permissions don't work under NTFS, so chmod won't do anything.
    If the Windows disks aren't "simple volumes", then I don't think any Linux will be able to use it.
    If the drive wasn't completely, properly, dismounted by the Windows system, Linux won't touch it. Connect it to a Windows system and manually unmount it.

    The only way to control users, groups and permissions on NTFS partitions is through mount options by specifying the user, group, and file masks to be used.

    The output from sudo fdisk -l would be very helpful as proof. Please use code tags so that output is readable and lines up in columns.

  5. #5
    Join Date
    Oct 2018
    Beans
    8

    Re: Folder is not writable by user root

    Here's the output of fsdisk -l.


    Code:
    [sudo] password for server: 
    Disk /dev/loop0: 2.3 MiB, 2433024 bytes, 4752 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop1: 14.5 MiB, 15208448 bytes, 29704 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop2: 34.7 MiB, 36323328 bytes, 70944 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop3: 86.9 MiB, 91099136 bytes, 177928 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop4: 4.9 MiB, 5148672 bytes, 10056 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop5: 13 MiB, 13619200 bytes, 26600 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop6: 87.9 MiB, 92119040 bytes, 179920 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop7: 42.1 MiB, 44183552 bytes, 86296 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 64B7405B-27EB-423E-876E-AD71947E636C
    
    Device      Start        End    Sectors  Size Type
    /dev/sda1      34     262177     262144  128M Microsoft reserved
    /dev/sda2  264192 7814035455 7813771264  3.7T Microsoft basic data
    
    Partition 1 does not start on physical sector boundary.
    
    
    Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0xb7fef16b
    
    Device     Boot Start        End    Sectors  Size Id Type
    /dev/sdb1        2048 3907026943 3907024896  1.8T  7 HPFS/NTFS/exFAT
    
    
    Disk /dev/sdc: 238.5 GiB, 256060514304 bytes, 500118192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0x03454243
    
    Device     Boot Start       End   Sectors   Size Id Type
    /dev/sdc1  *     2048 500117282 500115235 238.5G 83 Linux
    
    
    Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0xb7fef16a
    
    Device     Boot Start        End    Sectors  Size Id Type
    /dev/sdd1        2048 3907026943 3907024896  1.8T  7 HPFS/NTFS/exFAT
    
    
    Disk /dev/sde: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x55eca64c
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sde1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT
    
    
    Disk /dev/sdf: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xc2bd658e
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sdf1  *     2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT
    
    
    Disk /dev/loop8: 13 MiB, 13619200 bytes, 26600 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop9: 3.7 MiB, 3887104 bytes, 7592 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop10: 4.7 MiB, 4919296 bytes, 9608 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop11: 14.5 MiB, 15196160 bytes, 29680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop12: 10.1 MiB, 10571776 bytes, 20648 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop13: 3.7 MiB, 3878912 bytes, 7576 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop14: 140.9 MiB, 147722240 bytes, 288520 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/loop15: 2.3 MiB, 2355200 bytes, 4600 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Unfortunatley I don't have any way of connecting these drives to a windows machine. Would I be better just completely reformatting them? If I back up the files to another drive, reformat that drive then move the files back will I still have this issue?

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

    Re: Folder is not writable by user root

    First, all the loop devices are just clutter in the fdisk output. If you remove them, people won't be distracted and make mistakes. They are caused by using "snaps" for package installs.

    Second, sda, has this warning:
    Partition 1 does not start on physical sector boundary.
    That means that accessing files on sda1 is misaligned and between 10 and 30% slower than it should be.

    This is what I would do. I don't know if it is a good idea for you situation, but if you don't have Windows, then you don't need NTFS.
    I would get some new storage, format the new storage with ext4, then copy everything off the misaligned NTFS storage to the new EXT4 storage. Then I'd wipe that NTFS storage, create a fresh partition table using GPT, not MBR, and create a new EXT4 file system. Then I'd move to the next NTFS disk, copy over all the data to the new GPT+EXT4 disk. Then do that over and over for the remaining disks.

    I didn't look carefully at the disk sizes, but if the new storage is larger than any of the the other disks you have, it shouldn't be an issue. I think 2TB disks are $45 now. Ah .. sda is 4TB. I've seen 8TB disks for $140 recently, but I would only buy either an HTS or WD disk and avoid any other options. Actually, I have a rule that if I can't buy 2 disks of the same size, then I won't use any of the storage. 1 is primary, holding data and the other is a backup copy. This is my rule for media. For non-media files, I use normal, versioned, backups to a 2TB disk on a backup server. For the OS and all those little files, emails, documents, on a desktop, I keep 60 days of versioned backups. For higher risk servers, I keep 180 days of versioned backups. But for media, I keep 1 mirror that is maintained every few days using rsync.

    ext4 provides native Unix file permissions, owners, groups and ACLs. chown + chmod work. If you want more protection than ext4 provides, consider using ZFS, but beware that ZFS does being complexities. I'm not qualified to make suggestions for ZFS storage layout considerations. I probably wouldn't use ZFS over USB connections - only SATA or eSATA or with internal NVMe storage.

  7. #7
    Join Date
    Oct 2018
    Beans
    8

    Re: Folder is not writable by user root

    The amount of data I need to save on that drive is only around 700gb right now. I have a 1TB external I can format to EXT4 then transfer the files over, format the drive, restore the files and then rinse and repeat with the rest of them. It'll be a lengthy process but Should be done today hopefully. Should I do all the formatting from inside ubuntu or use Gparted?

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

    Re: Folder is not writable by user root

    Step 1: GPT partition (not MBR) You'll thank me later
    Step 2: Create EXT4 partition
    Step 3: Format new partition as EXT4
    Step 4 (optional) Reduce the "reserved blocks" for any "data partitions" from 5% to 1%. NEVER do this for OS or /home partitions, but for DATA partitions it is foolish to waste 5% of the disk, right? On a 4TB disk, 5% is 200G! tune2fs is the tool.

    Gparted is fine, but you can use any tool you like.
    Triple check that you have all the data moved, accurately before doing the new GPT partition table step. It is gone after that. Lots of people in these forums are very unhappy when they make mistakes. Linux does what we tell it to do, even if we don't understand the repercussions and data loss it will cause.
    Last edited by TheFu; October 15th, 2018 at 07:51 PM. Reason: s/was/waste/

  9. #9
    Join Date
    Oct 2018
    Beans
    8

    Re: Folder is not writable by user root

    Alright I managed to complete the steps above using gparted. But I can not copy the files over. When I try it says I don't have permissions to create it in the destination. chmod and chown didn't change anything on the external drive. I can try reformating again to see if that helps.

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

    Re: Folder is not writable by user root

    If you already did things correctly, why would doing them again make any difference? I'm just curious.

    Instead of claiming what you did, please try to show proof that you fixed the ownership and permissions. PROOF.

    That would be using these sorts of commands on the appropriate file systems.
    Code:
    df -hT
    ls -al
    Last edited by TheFu; October 15th, 2018 at 07:51 PM.

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
  •