Reader
lparravicini
Posts: 3
Registered: ‎12-09-2010
Accepted Solution

Invalid file permissions after uploading epub

Problem already solved, but I'll write here the solution in case it's useful to someone.

I've created an epub from scratch with Sigil (0.3.4) in OS X. When trying to upload the epub to Lulu, I got a validation error stating that the epub "Contains file permission errors". The epub validates on Sigil and with epubcheck 1.1.

After searching the forum and the Sigil issues, I discovered that Sigil (on Mac) creates several files with permissions 600, and Lulu needs this to be 644 (I think):

$ zipinfo -l Programacion_web_segura.epub

Archive:  Programacion_web_segura.epub   707352 bytes   68 files
-rw-------  2.0 unx       20 b- stor 20-Mar-11 12:06 mimetype
-rw-------  2.0 unx      242 b- defN 20-Mar-11 12:06 META-INF/container.xml
-rw-------  2.0 unx     9869 b- defN 20-Mar-11 12:06 OEBPS/content.opf
-rw-------  2.0 unx    11628 b- defN 20-Mar-11 12:06 OEBPS/toc.ncx

 

The quick solution I've found is to copy the epub to a windows machine, open it with Sigil and save it. Now the epub has the right permissions and Lulu validates it.

Professor
Ken Anderson
Posts: 11,719
Registered: ‎02-11-2010

Re: Invalid file permissions after uploading epub

Very useful - thanks.

Reader
lparravicini
Posts: 3
Registered: ‎12-09-2010

Re: Invalid file permissions after uploading epub

Comment added just to mark the post as solved. The solution is in the first post.
Editor
NickPopio
Posts: 2,074
Registered: ‎02-17-2010

Re: Invalid file permissions after uploading epub

Thank you for posting the solution!
---------------------------------------
Nick Popio
Community Architect - Inside the mind of a Community Manager
Reader
pinchgutpress
Posts: 24
Registered: ‎03-25-2010

Re: Invalid file permissions after uploading epub

I have written a small script that will run in terminal on a mac to fix the sigil permissions.  It's here:

http://www.pinchgut-press.com.au/script/epub-permissions-mac

Go there and save the file as text and then run it with your epub file.

If you're not familiar with running scripts on the Mac then do the following:

In terminal run the following command:

bash /path/to/script /path/to/epub-file.epub

You can do this by typing bash<space> in terminal,

then in finder drag the script icon to the terminal window,

then drag the epub file to the terminal window

then activate the terminal window and hit return.

In the folder with the epub file should now be another epub file called something like:

epub-file-p.epub

This should be your file with the permissions fixed.

 

Reader
taggurit2010
Posts: 1
Registered: ‎04-08-2011

Re: Invalid file permissions after uploading epub

what about a solution for Caibre on a MAC?  I have used epubchkr.  and ran the rile throught the terminals directed and not problems detected, also the iBookstore has already accepted and approved my file in their store.

Reader
posterband
Posts: 1
Registered: ‎04-15-2010

Re: Invalid file permissions after uploading epub

pinchgut!  Thank you.  This has been driving me crazy for weeks.  You got my files out of tight "pinch!"

Reader
tdodson
Posts: 1
Registered: ‎04-19-2011

Re: Invalid file permissions after uploading epub

This is terrific! Worked perfectly on my Mac Sigil-edited ebook that was getting rejected. Thanks so much.
Reader
Matthew Cousineau
Posts: 1
Registered: ‎07-12-2010

Re: Invalid file permissions after uploading epub

This script was amazing and you rock thank you so much

Reader
edavies8
Posts: 3
Registered: ‎04-07-2012

Re: Invalid file permissions after uploading epub

pinchgutpress, I downloaded your file and followed your instructions to a "t", but I still get the error: Did not pass epubcheck-1.1 validation. I am using Sigil on my Mac. Any thots?

Lulu is an advocate for global consumer privacy rights, protection and security. Copyright © 2002-2014 Lulu Press, Inc. All Rights Reserved.