1

I am using Linux Mint 19.1 Cinnamon and have a disc partition for files formatted in Ext 4. I want to compress some of the files and folders to a single file, to share with 2 other people who share my research interest, whom I know use Windows and Mac. The aim is for them to un-compress at their end, add information, re-compress and share back.

All my attempts so far have ended up with a zip file which is read only, and a folder that they cannot re-compress at their end, as they do not have user permissions.

As this did not seem to be a problem on my previous laptop running Linux Mint 18.2 MATE with the partition formatted to Ext 3, using standard Linux compression software. I have created a test Ext 3 partition to mount at start up with read/write access for all users (umask=0777). However, Nemo's Compress action (right click) still creates a read only zip (or iso) file.

Is my system set up with too stringent file permissions, as this seems too complicated in terms of sharing information? Alternatively, 'ownership' may be the issue and 'anyone' could modify the files and folders if I could make ownership 'universal'? These are not system files, just information. Any advice on how I could simplify things and be able to easily share information in this way would be much appreciated.

  • You're not creating a zip file, are you? compress creates .Z files. What are the Windows and Mac users using to uncompress .Z files? – muru Jun 26 '19 at 08:14
  • Ah, so not the compress command? Better clarify that in the question, it looked like you were using that. – muru Jun 26 '19 at 13:51
  • Even before the formatting, it looked that way. Have you tried using the zip command directly? The way the GUI does things can be a bit .. opaque, and harder to debug. – muru Jun 26 '19 at 14:28
  • I have looked on the zip man page, and in Stack Exchange, and from what I can see (https://unix.stackexchange.com/questions/313656/preserving-permissions-while-zipping) it is not possible to specify that all files and folders should be read & write using zip - unless perhaps you have a suggestion? The alternative is to look at this the other way around, and say 'ownership' is the issue - what would I need to do to make the files and folders modifiable by any user before and after compressing to a single file? – Warburgia Jun 27 '19 at 05:28
  • The thing is, zip doesn't save any permission information - when you extract the files, they get the default permissions. So if you used zip (and not something else by accident), they will have permissions to do whatever they want, because the default is usually to give the user full rights. – muru Jun 27 '19 at 05:30
  • I tried it using zip instead of 'Compress' from Nemo (zip -r test.zip 'My Folder'). The result was even more restrictive, it made the zip file rw only by me, and read only by my 'group' or anyone else. Thank you for your help - is it worth exchanging information on chat to see if a solution can be found? – Warburgia Jun 27 '19 at 06:04
  • The zip file's permissions don't matter, since you'll be sending it to them anyway (for example, if you copy to a NTFS/FAT32-formatted USB drive, those permissions will be lost as well, and reset to defaults). – muru Jun 27 '19 at 06:06
  • Thanks. I copied to a FAT32 USB drive and to a Windows laptop. Files and folders were set to read only, but I was able to change them, modify, re-zip from Windows, and unzip (from Nemo) again in Mint 19, and from where I was able to reset from read only to rw. It seems okay; let me try with the other 2 persons. From this, it would seem the 'File Roller' which is what the 'Compress' option in Nemo uses in Mint is the issue? Can the settings for File Roller be reset? – Warburgia Jun 27 '19 at 06:40

1 Answers1

0

The error message failed to preserve ownership … is because you used the -p option, and because FAT32 can preserve ownership.

compress dose not create zip files. There are many compression-algorithms / file-formats: compress, gzip, bzip, jpeg, zip. To create a zip file use the program zip.

This seems to be an XY problem

Therefore I will present an alternate answer.

Use a distributed revision control system: This will allow you to keep track of history, roll back if you have a problem, keep track of contributions, share your work more easily, and provide a backup. A good tool to use is mercurial on bitbucket.

Unfortunately distributed systems don't work well on un-mergable file, such as MS-Word files. For this you will need locking (which is a pain). A good tool for this is SVN (sub-version).

  • Many thanks for getting back to me. I should mention that it is not an XY problem - information is not stored in a single file one could keep track of, but in a cascading folder structure where folders and sub folders may contain information in text files, or in, say, image files relating to a particular 'topic' and all files should be amendable. Thank you for the comment on cp , that was an alternative approach I was trying. On zip, see above, it seems it cannot do so and make files read write. Is there a way that the ownership can be changed so that ownership is 'universal'? – Warburgia Jun 27 '19 at 05:34
  • “but in a cascading folder structure where folders and sub folders may contain information in text files, or in, say, image files relating to a particular 'topic' and all files should be amendable” — That is exactly the type of data that I keep in revision control. – ctrl-alt-delor Jun 27 '19 at 09:26
  • An XY problem is when you have a problem X, and see a solution Y, and ask how to do Y. – ctrl-alt-delor Jun 27 '19 at 09:27
  • Thank you for the clarification. I think the revision control could be useful for other projects, assuming they (Mercurial, Bitbucket) work cross-platform. – Warburgia Jun 27 '19 at 10:01