Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-01-2020, 02:59 AM
|
#1
|
Member
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63
Rep: 
|
NTFS external drives and permissions
Last year before selling a computer that had Windows and a separate data drive I copied its contents onto three smaller external drives that were formatted NTFS. I hadn't entirely finished with Windows at that point and didn't know what would come of the formatting, issue-wise.
I have set up a few computers and copied files to them from these drives. Sometimes as a result a text file is marked executable. The files usually have 'Anyone' in all three categories of their permissions as seen from the PCManFM file manager.
I had assumed from the Windows mindset that larger drives were formatted NTFS rather than fat and only belatedly became disabused of this.
Can I bulk-correct these permissions either on the external drives or when/after transferring to the Ubuntu or Debian machines or should I really be re-formatting the external drives and re-filling them? What is the best solution? What do people usually do? The external drives have ripped DVDs, ripped CDs, text files, word processor docs, pictures, all kinds. I'm not mad keen on having to move the films about, four hundred mp4 files, but will if need be. (It would involve getting a disk enclosure of some kind for my currently unused 2tb drive for the moving.)
Ideally the external drives would be readable by a Windows computer too but that's increasingly unnecessary for me. But do Linux-only people format external drives Ext4?
Edit: In PCManFM, some documents that I have through means other than having been transferred from one of my drives have as their permissions:
View Content: Anyone
Change content: Only owner and group
Execute: Nobody
And some have just 'Only owner' in the second category. What is the difference? Should it matter at any point? (One example is a screenplay from Fadein, screenwriting software, which is possibly set up to enable collaboration, which might be relevant.)
Last edited by tpprynn; 11-01-2020 at 03:06 AM.
|
|
|
11-01-2020, 03:29 AM
|
#2
|
Member
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63
Original Poster
Rep: 
|
"It depends how the NTFS filesystem was mounted before restoring the files. NTFS does not support Unix permissions, so by default all files appear to have all permissions (rwx) set for everyone."
'By default'. How should I mount these drives to sidestep the problem I've encountered please?
|
|
|
11-01-2020, 04:00 AM
|
#3
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,550
|
I think Many linux folk use ext4, (myself included) but others use encryption, and a variety of filesystems for a variety of reasons. It is rarely safe to generalise about linux users.
That said, restoring your permissions will be messy. It might be safer to install a fresh copy of windows, if that is a safe option for you. There are switches you can use with cp to preserve permissions, but copying NTFS --> ext4--> NTFS or any situation where your files land on a msdos/FAT/VFAT disk wrecks permissions. Backup & restore with rsync is faster, and preserves permissions, and is my preferred way of doing things. In linux, you can bulk correct permissions, sure.
I don know how your files are split on your three disks because you didn't say. but I would not split the windows directory off what will become C: in your windows system. You can take media to another disk, and complete software suites. How many disks does your box hold? You don't want your hard disks clogging usb ports as they will only become a bottleneck. My suggestion is: - Choose or buy an adequate disk for C: . If you are buying, make it big.
- Changing permissions is very tiresome. Do it if you need to only, otherwise reinstall.
- Sort your data out last.
Personally, I find that large disks can make data magpies. If you have seen films you can't imagine watching them again, why keep them? Why keep 3000 photos of you kid as a newborn? Keep a number, sure but not 3000. Why keep old software with security bugs? etc. etc. Just like work expands to fill the time available, data does. I am old enough to remember hearing about this new-fangled thing - a hard disk, more reliable than 5.5¨ floppies. It held 10MB. I remember thinking that that was more space than any business would ever need. At the time, files were a few k, and it was true. Boy, have times changed!
|
|
|
11-01-2020, 08:28 AM
|
#4
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
Quote:
Originally Posted by tpprynn
"It depends how the NTFS filesystem was mounted before restoring the files. NTFS does not support Unix permissions, so by default all files appear to have all permissions (rwx) set for everyone."
'By default'. How should I mount these drives to sidestep the problem I've encountered please?
|
This is documented in the NTFS manual page.
|
|
|
11-01-2020, 09:05 AM
|
#5
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
IMHO if I want to be able to backup & restore data from a windows system with the original ownership/permissions I would do as you did. If it is not necessary to keep the original ownership/permissions I would, as a regular user, just copy the desired data to an ext4 filesystem and be done with it. I then would not have to deal with the differing formats and permissions.
After copying from windows it would be necessary to change the file and directory permissions from the default 777 to the standard 750 and 755 used in most linux distros (or whatever you choose for yours).
|
|
|
All times are GMT -5. The time now is 10:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|