1

After collating my music from various locations and OS's I'd been trying to sync the resulting 400GB+ directory to my home/music folder but kept ending up without ownership or permissions in first all, then some of the resulting files.

This was despite chown'ing the entire mount prior as well as chmod'ing both the source and destination directories full -rwx for user and group both before and after the sync. Using grsync to preserve owner/permissions/group in the GUI didn't seem to make any difference either.

So I mounted the drive in Win7 and with two clicks in the context menu removed the read-only protection that had somehow been mysteriously applied after it's time in Ubuntu 14.10 but could not be identified in chmod and it seemed to solve the problem.

My questions are:

  1. what was I doing wrong?
  2. Why did terminal tell me I had full ownership and permission both at the source and destination yet the files remained unreadable?
  3. And why did I stop dual-booting and do a full install of this time-wasting mule of an OS?

Hopefully someone can enlighten me and my perseverance will be rewarded.

Fabby
  • 34,259
thepsyde
  • 13
  • 3

1 Answers1

0

For the future: it's better to ask one question so you can receive one answer, because the more questions you ask, the less likely you'll find someone that can answer all as they need to be an expert in multiple fields, which will become more and more unlikely the more questions you ask.

  1. From the problems you're having I can infer that you're using NTFS as your file system for both the Ubuntu /home and the Windows 7 X:\users directory. (Where X is the Windows drive letter you use) This is not wrong as such, but it takes an expert at both Windows and Ubuntu file permissions to make it work properly.

    So, I always also advise to have an OS partition for Windows under NTFS, an EXT4 for Linux and then:

    a. For the beginning user (not you), I advise to use FAT32 for a common data partition.

    b. For the average user, NTFS as a common data partition, but:

    1. To have X:\users separate from X:\home

    2. To create X:\home under Windows and set file permissions under Windows to System and Everyone

    3. Mount the entire NTFS partition under Ubuntu, allowing a /users with default Windows permissions and a /home with default Ubuntu permissions.

    4. Never move files to/from /users to /home but always copy and delete the original. (and vice versa too)

    c. For the expert: meh, whatever! Just don't mess it up!

  2. Probably because the ACLs under Windows were messed up.

  3. Hah! You want me to tell you why you did something? I'm sorry, but my right telepathy antenna is broken off and you're too far away from me to link directly to your computer right now. ;-)

    I got rid of Windows a long time ago: with wine I don't need Windows any more and my data has been safely migrated to ext4 a long time ago and if I now need to transfer anything, I just copy it to a FAT32 USB stick! (Mmmh, which actually makes me a beginning user according to my own definition!)

;-)

Fabby
  • 34,259
  • 1
    Thanks Fabby, My prior dual-boot used a fat32 data partition. This was me trying to migrate my data to fresh install on ext4, in this instance from an NTFS external drive not from Win OS. Always cp -r never mv but no, I wasn't about to delete files from the backup and would've been screwed if I had!! I never set the read-only permissions from Windows that somehow ended up on there (knowingly) so remain a bit perplexed. My assumption was that chmod and chown would just trump anything I played them against or at least tell me when it didn't work. Wrong, all in order still couldn't access. – thepsyde Feb 02 '15 at 19:59
  • 1
    lol, and I think it's your irony antenna which is damaged leading to malfunction in the hypothetical question processing unit ;) Thanks for the help, but still I wonder why I had to go back to Win OS to solve the issue....? Thought I was done with M$ – thepsyde Feb 02 '15 at 20:05
  • 2; Obviously the ACL's were messed up under windows and nothing worked until i went back to windows, but why should this be the case? And why did chown and chmod continue to tell me that i had full ownership and read write execute privileges for files i couldn't access? Problem solved but still don't understand the why's and wherefore's – thepsyde Feb 02 '15 at 20:17
  • Although Windows is a POSIX compliant OS, it does some things "the Microsoft way", so although the ntfs-3g driver can do a lot, it has no "inheritance" built-in so cannot access that unless you build Linux ACLs identical to whatever you "defined" (or not) on W7... So unless you ship me the drive I can't give you an exact, detailed answer to all your individual 400GB+ file questions... ;-) – Fabby Feb 02 '15 at 20:41
  • so if the acl's in linux are different from the acl's in win it will only display the linux acl's? the inability to access those files makes sense but not being able to report on the problem seems lame. can a different driver at least 'see' the conflict if not change it from within linux? – thepsyde Feb 02 '15 at 20:51
  • Here's a good article on exactly this: http://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/ and if you have any further questions, do not hesitate to ask a new question ;-) :P – Fabby Feb 02 '15 at 20:56
  • 1
    More complicated than i thought, small wonder I was having trouble :/ "The SIDs required to identify users and groups have to be originated from Windows...User mapping features required for devices which may be plugged into multiple Windows or Linux systems are not available yet." Thanks heaps for your time and expertise, much appreciated! – thepsyde Feb 02 '15 at 21:07
  • 1
    File systems talking cross-purposes and my work-flow not respecting the differences. Next time sort source permissions from native OS (NTFS Win7 this instance) BEFORE attempting to move or read/write/execute elsewhere (Ext4 Ubuntu14). Thanks Fabby for this link. – thepsyde Feb 03 '15 at 21:03
  • It is good to see that people actually read the stuff I give them! You made me laugh out loud! So, thank you for the laugh... ;-) – Fabby Feb 03 '15 at 21:05
  • 1
    Urg, all the backslashes :P – A.B. Aug 25 '15 at 10:41