I have an NFSv3 Ubuntu server.

When I extract a specific zip file, it creates a folder and several files. The folder is accessible over NFS, and the names of all the files are there. The only problem is that the files show as 0 bytes and won't open on my client.

If I create a new folder, and cp the files to it, they work!

I've run ls -l and lsattr - but I can't see any difference between the files. stat -c %a shows 744 for both.

Both files have the correct size when I run ls -l.

I've rebooted both client and server, it doesn't make a difference.

I feel like I'm going crazy here. Is there any permission or attribute which could be causing this?


If the directory is stored inside Zip without trailing '/' then it will be unzipped as a 0 byte file, if you run zip info you'll see that it's directory. cp is able to copy uziped files from this directory cause you target the files that have their inodes in the system. So the problems is with how you've zipped the file and its name. The directory specified for zipping must contain '/'. I think that you can edit zip and change name of directory to name/ to fix it.

| improve this answer | |
  • To clarify, the file is larger than 0 bytes. If I use ls -l I can see that it several MB. It just shows as empty when accessed via NFS. – Terence Eden Feb 1 '19 at 23:01
  • That's one of the faces of this bug :) Did my solution helped? – Kamil Kurzynowski Feb 3 '19 at 20:48
  • It did not help. Sorry. – Terence Eden Feb 4 '19 at 6:37

It turned out to be a permissions issue with the parent folder.

Running stat foldername/ showed the permissions were set to 744

I fixed this by running chmod 775 foldername/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.