public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Duplicity
@ 2016-02-18 14:07 J2897
  2016-02-19 10:13 ` Duplicity J2897
  0 siblings, 1 reply; 3+ messages in thread
From: J2897 @ 2016-02-18 14:07 UTC (permalink / raw)
  To: cygwin-apps

Cygwin appears to be appending unnessesary permissions to the files I
create/modify...

John ~ $ DUMP=/cygdrive/c/Users/John/temp/dump
John ~ $ icacls "$(cygpath -w "$DUMP")" /reset
processed file: C:\Users\John\temp\dump
John SH $ icacls "$(cygpath -w "$DUMP")"
C:\Users\John\temp\dump NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
                        BUILTIN\Administrators:(I)(OI)(CI)(F)
                        PC1-W7\John:(I)(OI)(CI)(F)
John ~ $ ll $DUMP
total 0
-rwx------+ 1 John None 0 Feb 18 12:02 New Text Document (2).txt
-rwx------+ 1 John None 0 Feb 18 10:24 New Text Document.txt
John ~ $ icacls "$(cygpath -w "$DUMP")" /inheritance:r
processed file: C:\Users\John\temp\dump
John ~ $ ll $DUMP
ls: cannot open directory /cygdrive/c/Users/John/temp/dump: Permission
denied
John ~ $ icacls "$(cygpath -w "$DUMP")" /grant "$USERNAME:(OI)(CI)F"
processed file: C:\Users\John\temp\dump
John ~ $ ll $DUMP
total 0
-rwx------ 1 John None 0 Feb 18 12:02 New Text Document (2).txt
-rwx------ 1 John None 0 Feb 18 10:24 New Text Document.txt
John ~ $ icacls "$(cygpath -w "$DUMP")"
C:\Users\John\temp\dump PC1-W7\John:(OI)(CI)(F)
John ~ $ setfacl -b "$DUMP"
John ~ $ icacls "$(cygpath -w "$DUMP")"
C:\Users\John\temp\dump NULL SID:(DENY)(Rc,S)
                        PC1-W7\John:(F)
                        PC1-W7\None:(Rc,S,RA)
                        Everyone:(Rc,S,RA)
                        NULL SID:(OI)(CI)(IO)(DENY)(Rc,S)
                        CREATOR OWNER:(OI)(CI)(IO)(F)
                        CREATOR GROUP:(OI)(CI)(IO)(Rc,S,RA)
                        Everyone:(OI)(CI)(IO)(Rc,S,RA)
John ~ $

Is it possible to stop all of these permissions from being automatically
applied? It's just that I seem to be having problems when restoring
Duplicity backups.

The Duplicity backups seem to be restored just fine. But Duplicity always
complains with "Permission denied" errors, which I don't like.

I wrote a  short script <http://pastebin.com/Xqkii5fB>   that I hoped would
prepare the permissions, which failed...

John SH $ ./restore.sh
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Feb 12 13:48:05 2016
Error '[Errno 13] Permission denied:
'/cygdrive/c/Users/John/temp/dump/hist/install.txt'' processing
hist/install.txt
Cleanup of temporary directory /tmp/duplicity-n0RUp5-tempdir failed - this
is probably a bug.
John SH $




--
View this message in context: http://cygwin.1069669.n5.nabble.com/Duplicity-tp124554.html
Sent from the cygwin-apps mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Duplicity
  2016-02-18 14:07 Duplicity J2897
@ 2016-02-19 10:13 ` J2897
  2016-02-19 11:52   ` Duplicity Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: J2897 @ 2016-02-19 10:13 UTC (permalink / raw)
  To: cygwin-apps

I've pretty much fixed my particular problem. I installed Cygwin years ago
from another Windows account which I switched from to get rid of Current
User registry problems. So I used Window's  takeown
<http://ss64.com/nt/takeown.html>   command to recursively change the owner
from my old account to my new account. I guess I should have just changed
the owner to the Administrators group incase I ever need to switch again. I
also reset the permissions of the source folders before backup as I think
that's what may have caused the 'hist/install.txt' permission error. The
"Cleanup of temporary directory problem" persists, although that may just be
due to permission inheritance.



--
View this message in context: http://cygwin.1069669.n5.nabble.com/Duplicity-tp124554p124586.html
Sent from the cygwin-apps mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Duplicity
  2016-02-19 10:13 ` Duplicity J2897
@ 2016-02-19 11:52   ` Corinna Vinschen
  0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2016-02-19 11:52 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]

Hi John,


Sidenote: This is the wrong mailing list.  cygwin-apps is for Cygwin
package maintainers only.  The user list is cygwin AT cygwin DOT com.
But, never mind for now.


On Feb 19 03:13, J2897 wrote:
> I've pretty much fixed my particular problem. I installed Cygwin years ago
> from another Windows account which I switched from to get rid of Current
> User registry problems. So I used Window's  takeown
> <http://ss64.com/nt/takeown.html>   command to recursively change the owner
> from my old account to my new account. I guess I should have just changed
> the owner to the Administrators group incase I ever need to switch again. I
> also reset the permissions of the source folders before backup as I think
> that's what may have caused the 'hist/install.txt' permission error. The
> "Cleanup of temporary directory problem" persists, although that may just be
> due to permission inheritance.

It would be nice to get a better description.  The code is obviously
rather new so there might be a bug lurking in the wings.  Please keep
in mind that Cygwin tries to emulate POSIX ACLs and permissions, unless
you mount a directory with the "noacl" mount flag.  So the permissions
created are reflecting POSIX defaults in the firsat place, not Windows
defaults.

As for the permission problem, is it related to execute permissions?
If so, this might be by design, but I can't be too sure without
seeing the getfacl and icacls output of the *unchanged* permissions
generated by Cygwin.  So, ideally, can you provide getfacl and icacls
output for the temporary directory as well as a file in there created by
Duplicity?  I take it Duplicity *is* a Cygwin tool?

One thing you should avoid is to call icacls or using the Windows GUI to
change the permissions created by Cygwin.  The native Windows tools
might reorder the ACL which is bad in terms of emulating POSIX
permissions.  Please try to fix your problem with Cygwin's chmod or
setfacl instead and if Cygwin screwed up, it would be nice to learn
how so to fix that for the future... as long as it's clear that we're
emulating POSIX perms.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-19 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 14:07 Duplicity J2897
2016-02-19 10:13 ` Duplicity J2897
2016-02-19 11:52   ` Duplicity Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).