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.
I have a bunch of folders with files inside that reside in a VeraCrypt volume. I want to copy them all to a USB stick in order to paste them on another computer. A straight copy/paste does not work because permission is denied. I am the only user of the computer, and the user/owner has read/write permission.
I have tried
Code:
sudo chown -R 777 path/to/VC/directory
but nothing happens. I also tried it with "chmod", nothing happens.
The only way I can do the copy procedure is if I open a file manager as root on the source computer and the same for pasting on the receiving computer. But the I can only use the file if I open the file manager as root, which is not the right way to go about this.
I am probably doing something wrong, so how can I achieve the permission change?
I want to copy them all to a USB stick in order to paste them on another computer.
What kind of file system is that USB stick?
Note that "Windows" type of fs'es (FAT, NTFS) do not have the concept of "ownership", the owner of the directory and files will be the mounting ID (unless specified different as an option). And there is an attribute for readonly/readwrite, but as there's no owner/group/world concept none for group/others and no X-bits either. All those are simulated at the mount.
So for FAT/NTFS: use i.e. -o uid=<your ID number>,fmask=0133 as mount options.
Assuming that the user number (UID) is the same on your source and target machines (which it will probably be for a single-user system, i.e. 1000), all you need to do is ensure that the USB stick's filesystem (ext4) is also fully owned by your user (using chown -R). You can then use it to transfer files from one machine to the other to your heart's content.
So, my question is, do you still need to change permissions since you were successful in copying files to USB?
If so, are you able to change permission of files that were copied to USB?
No, I don't need to change permissions anymore in this particular case, and yes, I am able to change permission of the copied files, which are now residing in a VeraCrypt container on the new laptop
Many thanks for your help.
Last edited by Klaas Vaak; 05-08-2019 at 07:05 AM.
Assuming that the user number (UID) is the same on your source and target machines (which it will probably be for a single-user system, i.e. 1000), all you need to do is ensure that the USB stick's filesystem (ext4) is also fully owned by your user (using chown -R). You can then use it to transfer files from one machine to the other to your heart's content.
As you can see from reply to dc.901, I am OK now. You may be right that the ownership of the USB stick might not have been right. What is important for me, for future reference, is that I am able to change ownership and permission, using the right syntax. Many thanks for your help.
Last edited by Klaas Vaak; 05-08-2019 at 07:05 AM.
Reason: used dc91 instead of dc.901
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.