LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 11-01-2020, 02:59 AM   #1
tpprynn
Member
 
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63

Rep: Reputation: 0
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.
 
Old 11-01-2020, 03:29 AM   #2
tpprynn
Member
 
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63

Original Poster
Rep: Reputation: 0
"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?
 
Old 11-01-2020, 04:00 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,550

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
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:
  1. Choose or buy an adequate disk for C: . If you are buying, make it big.
  2. Changing permissions is very tiresome. Do it if you need to only, otherwise reinstall.
  3. 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!
 
Old 11-01-2020, 08:28 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by tpprynn View Post
"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.
 
Old 11-01-2020, 09:05 AM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
access, ownership and permissions for external "drives" SaintDanBert Linux - Desktop 4 09-17-2012 12:24 AM
Post-install Tips, User Permissions, and Auto-mounting External Drives jrhorn424 Slackware 9 10-03-2011 10:44 AM
Urgent: Failing NTFS HD - Will ddrescue Read & Write To Windows NTFS Drives? zipgunner Linux - Newbie 15 03-08-2011 06:29 AM
How can I adjust my permissions so that I can mount NTFS drives without the terminal? Zerimas Linux - Newbie 3 09-28-2008 12:59 AM
External Drives (iPod and Pen Drives) dhbiker Slackware 13 04-08-2004 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration