bugstoreBackup - Bugs: bug #43943, Directories in backup do not have...

 
 

bug #43943: Directories in backup do not have the original permissions

Submitter:  None
Submitted:  Tue 06 Jan 2015 11:32:11 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 08 Jan 2015 10:08:45 AM UTC, comment #9: 

It's not possible to realize the settings of permissions in another way generally.

StoreBackup does the following (simplified a lot):

1. going down from top level of backupDir and generating the files and directories.
Permission 0700 is used temporarily for security reasons.

2. going up from lowest level of backup and setting the final permissions of the directories.

Now imagine the case when you make a backup as 'JoeAverage' . Also imagine, you are creating from top down the directories with the correct permissions. Unfortunately you've set the permissions for one directory in a way that you yourself ('JoeAverage') have no write permissions in that directory... Then you cannot backup the files and directories inside that directory any more.
Naturally, JoeAverage cannot save files where he does not has read access to.

btw, root can read all files, even those where he has no read permissions (chown 000).

Heinz-Josef Claes <hjclaes>
Group administrator
Wed 07 Jan 2015 03:03:15 PM UTC, comment #8: 

By the way, I'm ok to consider this ticket as solved. It may even not be an issue if there is a reason why directories's permissions are chmoded 0700 during a backup (in which case you might consider mentioning it in the documentation).

Meilleures salutations de Paris :-)

Vianney Stroebel <viybel>
Wed 07 Jan 2015 02:09:01 PM UTC, comment #7: 

Thanks for your reply.

I found out that when a backup is completed, the directories' permissions are set right. It is only during a backup (and when a backup is stopped before it has completed) that the directories' permissions are all 0700. Is it meant to be that way?

My root user's umask already is 0022 (Ubuntu's default) so it is not the culprit here.

Vianney Stroebel <viybel>
Tue 06 Jan 2015 09:25:51 PM UTC, comment #6: 

I think I now understand the reason of the problem.

Sorry, I already fixed it some months ago (it will be part of the next version). But the next version is not ready and (therefore) not tested. So it doesn't make sense to hand over the new / next version to you.

Someone detected that storeBackup depends on the settings of umask.
If your umask setting is "uncommon", the permissions are not set correctly.
It should work, if you set umask to 0022 before starting any of the scripts:

# umask 0022
# storeBackup ......

Hope this solves your problem.

meilleurs salutation de l'Allemagne

Heinz-Josef Claes <hjclaes>
Group administrator
Tue 06 Jan 2015 02:27:48 PM UTC, comment #5: 

(Sorry for the spamming, I wish I could edit my comments).

File permissions are preserved (i.e. identical to original), only directory permissions are chmoded 0700.

Vianney Stroebel <viybel>
Tue 06 Jan 2015 02:25:07 PM UTC, comment #4: 

More info:

All directories in my backup tree are chmoded 0700 (contrary to the original directories obviously).

Owner in all directories is preserved (identical to original).

Vianney Stroebel <viybel>
Tue 06 Jan 2015 02:20:16 PM UTC, comment #3: 

Other information that might be relevant:

My OS is Kubuntu.

backupDir is in a USB disk on ext4 mounted with options "defaults,noauto,errors=remount-ro".

backupDir and series directories are chmoded 0755.

Vianney Stroebel <viybel>
Tue 06 Jan 2015 02:14:50 PM UTC, comment #2: 

I use the latest 3.5 (downloaded yesterday).

In case you are wondering, the sticky bit is not set on the parent directories (backupDir and series).

Vianney

Vianney Stroebel <viybel>
Tue 06 Jan 2015 01:16:30 PM UTC, comment #1: 

Hi Vianney,

I do not have that kind of problem in my backups.
So, do you use the actual version (3.5) or an old one?

You get the version number by call one of the scripts with the option '--version'.

Heinz-Josef Claes <hjclaes>
Group administrator
Tue 06 Jan 2015 11:32:11 AM UTC, original submission:  

Directories in backup do not have the original permissions even though ignorePerms is commented out in my config file.

For example, /etc is 0755 on my  machine but 0700 on the backup.

As a result, I can only browse my backup files with the root account.

Vianney

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by viybel (Posted a comment)
  • -email is unavailable- added by hjclaes (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-08 hjclaes StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code