jotta / jotta-cli-issues

46 stars 1 forks source link

Not able to backup folder #78

Open widert opened 5 years ago

widert commented 5 years ago

Make sure you are running the latest version of jotta-cli before reporting an issue.

jotta-cli release (jotta-cli version): 0.5.14545

Description of problem: Folder - permission denied

Expected:

jotta-cli status (jotta-cli status):

   Path      : /home/wide/macDocs
   Files     : 0 files / 0bytes
   Status    : Up to date!
   ---- The following paths could not be backed up ----
   /home/wide/macDocs => lstat /home/wide/macDocs/.AppleDouble: permission denied                     

Relevant logs for the issue (cat ~/.jottad/jottabackup.log)

pid:903 2019/04/29 12:36:36 Running scan of /home/wide/macDocs
pid:903 2019/04/29 12:36:36 Sanity error for scan of path [/home/wide/macDocs] => [lstat /home/wide/macDocs/.AppleDouble: permission denied]
pid:903 2019/04/29 12:36:36 Scan completed of [/home/wide/macDocs] completed in 5.035906ms [0 files 0bytes]

Traceback

Additional info: Trying to fix access according to https://docs.jottacloud.com/jottacloud-command-line-tool/using-the-command-line-tool/jottacloud-cli-and-permissions-on-linux, using "First solution":

sudo chgrp jottad /home/wide/macDocs/ sudo chmod -R g+r /home/wide/macDocs/ sudo chown -R wide:jottad /home/wide/macDocs/

Still get the following error message: Path : /home/wide/macDocs Files : 0 files / 0bytes Status : Up to date! ---- The following paths could not be backed up ---- /home/wide/macDocs/tom => lstat /home/wide/macDocs/tom/.AppleDouble: permission denied /home/wide/macDocs/anniken => lstat /home/wide/macDocs/anniken/.AppleDouble: permission denied

existemi commented 5 years ago

@widert We've updated and tried to clarify what you need in the docs:

$ find /home/<username>/folder_to_backup -type d -exec chmod g+x {}\;
$ # Set all files and folder to group readable
$ chmod -R g+r /home/<username>/folder_to_backup

What you are most likely experiencing is that while all files are group owned and readable by the jottad group, the folders are not executable, which means jottad cannot list the contents.

pehkawn commented 3 years ago

Hi, I was facing a similar problem with not all files being backed up. After a bit of hair pulling, trying to figure out what's wrong, it finally works. Took a while to understand the function and importance of the first command. I just wanted to point out that the command above and in the documentation has a small typo. It lacks a space between {} and \;, which returned the following error: find: argument for «-exec» missing.

Adding a space, the full command would be:

# Find all subdirectories and set to executable by the group
$ find /home/<username>/folder_to_backup -type d -exec chmod g+x {} \;
Kimbsen commented 3 years ago

I've updated the documentation. Thanks for letting us know!