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 because the user that performs the move doesn’t have write permissions to DOC or to VNA_2_BAD.txt.
Allow me to reply.
I can save the file anywhere else.
HOW DO I CHANGE THE OWNERSHIP OF THE ARRAY?
I did try
chown jim /dev/md127
chown jim /dev/md0
I suppose I need to say it did not work
You ned to distinguish between the device that contains the data and the filesystem structures that manage the data on the device. It’s the latter that control how you can read/write/delete/create files.
Car analogy: If you have the tools and access to the digital infrastructure in your car, which would allow you to repair its engine, you still need a key to drive it. Actually, the driver doesn’t need access to the engine and normally doesn’t have access; the key is sufficient. In your case, user jim is the driver. User root is the repair technician.
So, don’t modify the engine to drive the car, and don’t change device permissions to access files. Actually, this could break something. Instead, change the permissions of the files and directories on that device: media, jim, DOC and do on.
For example:
Code:
chown -R jim:jim /media/jim
Last edited by berndbausch; 10-20-2018 at 07:54 PM.
At this point I do not want to change ALL ownership, just the RAID array.
You can do that, but it won't help with your problem of moving files and saving LibreOffice documents.
You need to change the ownership of the files and directories that are on the array. Not the ownership of the device. Presumably, the array is mounted at /media/jim. It is there that you have to adjust ownership or write permissions.
Changing device ownership has no effect on the file permissions. Like your car: If you have a way to open the hood, it doesn't mean you can open the door and drive it.
OK, stupid question.
How can I change file ownership if I cannot save / copy /move the file there?
So which "disk" is the array?
RAID5 is 3 disk / four partitions.
Quote:
jim@jim-desktop:/media/jim$ ls -l
total 76
drwxrwxrwx 1 jim jim 4096 Nov 15 2016 0822C8912019FFC8
drwxrwxrwx 5 jim jim 4096 Jul 26 2017 Alternate downlo
drwxr-xr-x 3 jim jim 4096 Dec 31 1969 COPY_OS64_1
drwxr-xr-x 24 root root 4096 Oct 18 22:11 d6513968-3c2a-4e81-b223-7f7c11f1ae2e
drwxr-xr-x 33 jim root 4096 Oct 14 12:37 Eclipse
drwxrwxrwx 1 jim jim 8192 Apr 9 2016 Ex Drive Co
drwxr-xr-x 3 root root 4096 Aug 7 2017 OLD_DISK_2
drwxrwxrwx 1 jim jim 4096 Apr 9 2016 OpenCameraB
drwxrwxrwx 1 jim jim 8192 Aug 8 2017 OS-D
drwxrwxrwx 1 jim jim 8192 Dec 18 2017 Photo Album
drwxrwxrwx 1 jim jim 8192 Oct 17 22:32 Programs
drwxrwxrwx 1 jim jim 4096 Sep 14 2016 REsume
drwxr-xr-x 23 root root 4096 Aug 10 2017 SDR_5
drwxr-xr-x 3 root root 4096 Jul 16 2017 tets_PRIMARY
drwx------ 12 jim jim 4096 Oct 19 07:17 WorkspaceRaspber
jim@jim-desktop:/media/jim$
For example, under /media/jim you have four directories owned by root, and which have no write permissions for jim. If you try to create or overwrite a file in one of them, you generate an error. If you want these directories to have write permissions for jim, one possibility is changing ownership. Another is changing the permissions, i.e. setting the w flag. A third more advanced option is using file access control lists.
/dev/md127 is just the device ID. Once the array is built you still need to create a filesystem and mount it to the desired mount point.
Did you format and mount the array?
mkfs -t ext4 /dev/md127
mount -t ext4 /dev/md127 /mnt/my_array (Replace /mnt/my_array with your real mount point)
Formatted, but not mounted.
I got it working with all partitions mounted to common directory.
I am not getting partitions names so
I'll try to mount each individually next time.
Addendum
The mount point changed after changing ownership and reboot.
Still have some individual partitions issues due to different permissions. But in general it works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.