03-29-2015, 04:08 PM | #61 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
When I try to run it as user it insists that library database is corrupted and tries to repair it...
but there is nothing wrong with database - if I run it as root it is perfectly fine Database is (as everything else) is read/write/modify by anybody. The only issue I can think about, is that usb stick mounts in /media (which is only accessible as root). |
03-29-2015, 04:14 PM | #62 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Huh? I mean, /media is usually only writeable as root... but it should be readable by everyone, else how do you find your drives???
|
Advert | |
|
03-29-2015, 04:26 PM | #63 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
I know... I am as puzzled as you are by this weird behaviour.
|
03-29-2015, 05:29 PM | #64 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
SOLVED the problem
It would appear that when Calibre creates library database metadata.db and metadata_db_prefs_backup.json it assigns to them an owner "1000" with write permissions to owner only. I never created these files so it didn't occur to me to check the owner until this particular problem. Which of course meant that it was OK when running as root, but not as dogsbody. Simple solution - was to manually change the owner (to root as everything else onm this usb stick) All runs as clappers What do you reckon about this? |
03-29-2015, 05:35 PM | #65 |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I reckon you should get 1000 brownie points - when you installed and ran the welcome wizard who were you logged in as? I think that's when the files are created.
BR |
Advert | |
|
03-29-2015, 05:47 PM | #66 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
Don't know enough to quibble, but I never existed as "1000"
Most puzzling (although I must admit that this is the usual state of mind for me ) |
03-29-2015, 06:12 PM | #67 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Sounds like those files escaped the umask, I assume like everything else they were created before the current version of calibre-portable.sh -- so, the question is, when you originally did "chmod 777", did those files get skipped? Or is calibre overriding the umask, because I don't think it is.
|
03-29-2015, 06:29 PM | #68 | |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
Now that I know what the problem was I will create brand new/virgin usb stick to test it all, because to be honest even if I knew the answers to your questions, I wouldn't be sure I am right...
I'll be back ps... just realised - library directory was copied from backup directory created on another linux machine - had a look at it and all the directories are owned by "1024" What's going on? I am not a number.... it would appear (from my searches) that: Quote:
Still doesn't explain why they have escaped umask? Last edited by bambuko; 03-29-2015 at 07:00 PM. |
|
03-29-2015, 07:15 PM | #69 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, the umask only applies for newly-created files, hence why I asked if it works on a virgin library.
As far as the actual user account, those are stored as numbers, it is the OS that gives them username labels. They don't typically transfer well across systems -- at least, they don't automagically bind themselves to the user account you desire. |
03-29-2015, 07:55 PM | #70 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Look in /etc/passwd Users assignments typically start at 1000 |
|
03-30-2015, 01:20 PM | #71 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
OK...
re-created the usb stick and found the problem: When copying library from it's backup location to usb stick all the directories change their owner from whatever it was in backup directory (in this particular case it happened to be 1024) to the root (which I am when doing the copying), but... metadata.db and metadata_db_prefs_backup.json (and all the files inside sub-directories) do not change the owner and retain whatever it was originally (in this case 1024) In doing so I have re-created exact issue I have reported before, and exactly as before if I run the script it reports that database is corrupted. Ownership of the files inside sub-directories of library doesn't matter a hoot and Calibre is not bothered about it at all (once it gets going) It is only the two database files that seem to bother it when starting Luckily by now I know exactly what to do go on the usb stick into the CalibreLibrary and manually modify the owner to root and Bob is your uncle I am not knowledgeable enough to understand what is going on - I just report For now I will modify my Library and use it OK. Last edited by bambuko; 03-30-2015 at 01:25 PM. |
03-30-2015, 01:31 PM | #72 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Ownership of the files matters greatly. If you try to do anthying with them, you will soon see...
calibre doesn't try reading and writing to every file just because you launched the program, it maintains info in the database and tries to access the files as and when needed. Try running calibre sometime with a database copy-pasted from a library into an empty folder. It will work... until it doesn't. |
03-30-2015, 01:48 PM | #73 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
OK, so what do I do with it?
I guess there is a Linux way of copying Library without loosing permissions and ownership? Off to educate myself Last edited by bambuko; 03-30-2015 at 02:17 PM. |
03-30-2015, 02:32 PM | #74 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Code:
cp -pr rsync -a (for archive) does that too. Note: Must run as root in order to set ownership. There you go, I've saved you the time to google the answer: answer being, "man cp". |
03-30-2015, 02:51 PM | #75 |
Connoisseur
Posts: 62
Karma: 10
Join Date: Feb 2014
Device: Kobo mini, Kobo Clara HD
|
Starting totally from scratch, including installing Calibre directly into the stick (just in case this is also causing some grief) and then big cp of library and will report result!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Portable | cstandifird | Devices | 3 | 01-24-2012 02:29 PM |
Portable Calibre? | hermes | Related Tools | 2 | 06-02-2011 02:50 PM |
Calibre Portable | beckywc | Calibre | 4 | 12-21-2010 11:13 AM |
Portable Linux version of Sigil | readx | Sigil | 9 | 09-03-2010 02:59 AM |
Portable Linux-Mobile-Guide for iSilo and Plucker | Colin Dunstan | Lounge | 0 | 08-31-2005 05:48 AM |