Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is my first post here and I’m glad to be aboard. I use Xubuntu 16.04 with an I5 processor, ssd and a Lenovo ThinkCenter M91P punch box-it flies!!
I do need help with formatting an ext4 drive though. I’ve just about given up.
I recently was given a 300GB drive, and I’d like to use it as a portable USB drive with no OS onboard.
I removed my primary SSD from my system, booted with a live DVD, and proceeded to wipe the drive by overwriting miscellaneous data. I then formatted it as an ext4 partition using gparted. After the format, I can’t write write to it however, it appears to be owned by root/root. There are so many articles regarding how to overcome this problem, but I’m not quite able to understand them because the articles are to technical for my level of expertise.
I believe I need to use the chown command to change the ownership of the drive. I have removed my primary drive again (temporally) and have booted from the Live DVD. I started gparted and found my drive was mounted in /dev/sda1. I then issued the following command:
sudo chown -R paulaul /dev/sda1
It didn’t work and it objected to the paulaul name. Since I was running from the live DVD, I didn’t expect it to reject the name ‘Paul’, but that is exactly what it did.
Welcome to LQ!
There are many ways to skin this cat. Actually, Ubuntu should mount USB devices automatically when you plug them in and user should have access by default. It does not work for you?
The drive does mount itself. But I can't drop and drag to store a file on it.
I could make a video to show what really happens, but I suspect the video would be to large to store here.
If I format the drive in any other format, there is no problem. Any EXTx formatted drive won't allow files to be written to the drive. Heres a screen capture showing the permissions.
I think it is a bug in gparted, but it is a long standing issue. The first time I tried linux (in 2011), I remember the same problem. I gave up and walked away from linux in 2011, because of this issue. And, I can't believe it hasn't been fixed. This is not a complaint or a gripe-as I understand linux is provided 'as is'. But it sure would be nice to correct the issue, many users have the same issue.
I believe I figured out a work around....I simply install an OS on the drive and the default permissions for the drive allow copying riles to the root directory, or to the home directory. If there was a small linux version, I would install it and simply use that OS to allow writes to the drive.
That's overkill for sure. You could add this drive to your /etc/fstab and set the mount options there, including the mount point. It probably makes sense to use filesystem UUID instead of device node there.
The permission is on the mountpoint (/run/media/<blah>/<blah>/...) not the device node (/dev/sda1). Don't try messing with device nodes - even when they are partitions rather than physical devices; /dev/sda is the device node for the disk itself.
From your real system, plug the drive in and run this, and post the output.
Code:
df -hT
sudo lsblk -f
mount | grep -i /dev/sd
Last edited by syg00; 09-13-2017 at 06:00 PM.
Reason: add mount
The permission is on the mountpoint (/run/media/<blah>/<blah>/...) not the device node (/dev/sda1). Don't try messing with device nodes - even when they are partitions rather than physical devices; /dev/sda is the device node for the disk itself.
From your real system, plug the drive in and run this, and post the output.
At the moment I ran the suggested code, the usb portable drive was formatted in NTFS.....which appears to be fully functional. And that my primary drive is encrypted.
then you should be able to drag stuff to /mnt/MyNonRootStuff/, but NOT to /mnt/ (unless you are root). It's a unix permissions thing, not really specific to linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.