public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin's chmod +X
@ 2004-05-18 20:02 roger
  2004-05-19 11:53 ` Chris January
  0 siblings, 1 reply; 2+ messages in thread
From: roger @ 2004-05-18 20:02 UTC (permalink / raw)
  To: cygwin

I noticed while creating a bash script to backup my parents outlook &
mydocuments folers, that WindowsXP does not recognize a "superuser" as
being allowed access to a users folders!

(bah. roger grumbles some more.)

Anyways, I set out to mainly change these permissions myself within the
script and yet found another bug while performing chmod a+X -R
./some_folder_with_subfolders

(In brief, the -X set's the bit for folders to allow a user entry and -x
is to set execution bit)

I've found at times that issuing the "chmod a+X -R" would also give
files execution permissions.

I basically had to fiddle and found hack (or a way) around this issue by
doing:

cp -rf ./some_folder ./
chmod a+X -R ./some_folder

I used the "cp -rf" option instead of "cp -ax" (or for preserving
original permissions) and allowed the shell to specify permissions for
new files.

I would have loved to "cd /root_folder" ; "tar -cpvjf backup.tar.bz2
./some_folder", however, I ran into problems with the reliability of
using "chmod a+X" on the original file system (or paranoia of fiddling
more with Windows -- ie "Why Fix something if it isn't -obviously-
broke?")

So basically, I'm copying the original folder to a tmp location and then
removing them once tar is finished.

This appears to be a MS Windows bug issue due to it's more relaxed file
permissions?

-- 

Roger
http://www.eskimo.com/~roger/index.html


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: Cygwin's chmod +X
  2004-05-18 20:02 Cygwin's chmod +X roger
@ 2004-05-19 11:53 ` Chris January
  0 siblings, 0 replies; 2+ messages in thread
From: Chris January @ 2004-05-19 11:53 UTC (permalink / raw)
  To: roger, cygwin

> I noticed while creating a bash script to backup my parents outlook &
> mydocuments folers, that WindowsXP does not recognize a "superuser" as
> being allowed access to a users folders!

You can only access a folder if you have been given permission (in the ACL)
unless you open it in backup mode. You can only change the ACL if you are
the owner of the folder. If you are an Administrator you can take ownership
of the folder and change the permissions. What you actually want to do is
change the owner of these folders to the Administrators group and then:
Before backing up:
cacls * /t /e /g yourusername:F
After backing up:
cacls * /t /e /r yourusername
or something like that...

In Local Security Policy you can change the default owner of objects created
by members of the Administrators group to Administrators by changing the
"System Object: Default owner for objects created by members of the
administrator group option" in Local Policies/Security Options.

Chris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2004-05-19 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-18 20:02 Cygwin's chmod +X roger
2004-05-19 11:53 ` Chris January

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).