RE: permission question

2016-12-07 Thread Michel LaBarre


> -Original Message-
> From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On
> Behalf Of Greg Freemyer
> Sent: December-07-16 5:08 PM
> To: brian.ing...@systematicsw.ab.ca; cygwin@cygwin.com
> Subject: Re: permission question
> 
> If I'm going to relegate rsync to the trash bin due to it not
> supporting Windows permissions well enough to be useful, I've got
> other Windows recursive copy tools I use that don't preserve
> permissions either.
> 
> I can't tell you how much I love Windows security permissions.  :(
> 
> In the mean time I have a huge number of folders now on my destination
> drive I need to delete.  (over a million files it seems).
> 
> Neither cygwin, nor windows says I have permission to delete them.
> 
> Any idea how I can do it short of reformating.


You should be able to take ownership recursively of the offending files and 
then remove them.
(Right click - Security => Advanced => Owner Tab => Edit (you may be prompted 
by UAC for admin credentials) => Other users or groups => pick one
Don't forget to select "Replace owner on subcontainers and objects".  In a 
separate step, reset the permissions recursively to get full control, then 
delete everything.)

By the way, did you ever try to setup fstab to apply noacl to default mounts 
before doing your rsynch?
I wonder if that would have reduced your problems.


> 
> Thanks
> Greg
> --
> Greg Freemyer
> 
> 
> On Wed, Dec 7, 2016 at 3:39 PM, Brian Inglis
> <brian.ing...@systematicsw.ab.ca> wrote:
> > On 2016-12-07 13:12, Erik Soderquist wrote:
> >>> I really like cygwin and have used it for a decade plus.  Only in the
> >>> last year or 18-months have I noticed significant permission issues
> >>> that slow down my workflow.
> >>>
> >>> Copying these folders/files from one drive to another is a task I'd
> >>> like to accomplish, but even more importantly I'd like to understand
> >>> how to work with permissions in cygwin.  As it is, I'm concerned I
> >>> will have to leave cygwin behind and I don't want to do that.
> >>
> >> I've been a Windows and Linux admin for years, and Windows
> permissions
> >> can be a pain, but can also be very granular.
> >>
> >> What I normally do for something like this is use robocopy's "backup
> mode"
> >> switch to bypass permissions on the source entirely and intentionally not
> >> copy the permissions to the destination, then set up the permissions I
> want
> >> on the destination after the copy is complete.
> >>
> >> The "backup mode" option requires either backup operator or local admin
> >> permissions to use.
> >
> > Concur and recommend for local copies:
> >
> > robocopy src dst /s /sl /xj /copyall /zb /nfl /ndl /np /mt:8 /r:0 /w:0
> >
> > to copy non-empty directories; keep winsymlinks as is; skip junctions;
> > all info; backup fallback; no file, directory, or progress logging;
> > 8 threads, no retries, no waits: use /copy (like cp -p) instead of
> > /copyall to skip security info.
> >
> > --
> > Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
> >
> > --
> > Problem reports:   http://cygwin.com/problems.html
> > FAQ:   http://cygwin.com/faq/
> > Documentation: http://cygwin.com/docs.html
> > Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> >
> 
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple


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



Re: permission question

2016-12-07 Thread Erik Soderquist
On Wed, Dec 7, 2016 at 5:08 PM, Greg Freemyer  wrote:
> If I'm going to relegate rsync to the trash bin due to it not
> supporting Windows permissions well enough to be useful, I've got
> other Windows recursive copy tools I use that don't preserve
> permissions either.

I still use rsync in cygwin, just not on things that have "separate"
windows permissions

> I can't tell you how much I love Windows security permissions.  :(

Same!

> In the mean time I have a huge number of folders now on my destination
> drive I need to delete.  (over a million files it seems).
>
> Neither cygwin, nor windows says I have permission to delete them.
>
> Any idea how I can do it short of reformating.

This will obliterate the permissions, so you are aware up front...

In the Windows security dialog, go to advanced --> owner, and forcibly
take recursive ownership of the tree.  On annything you do not have
access to, Windows should prompt you to overwrite the security so you
do have access.  Local Admin is required to be able to do this.

-- Erik

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



Re: permission question

2016-12-07 Thread Greg Freemyer
If I'm going to relegate rsync to the trash bin due to it not
supporting Windows permissions well enough to be useful, I've got
other Windows recursive copy tools I use that don't preserve
permissions either.

I can't tell you how much I love Windows security permissions.  :(

In the mean time I have a huge number of folders now on my destination
drive I need to delete.  (over a million files it seems).

Neither cygwin, nor windows says I have permission to delete them.

Any idea how I can do it short of reformating.

Thanks
Greg
--
Greg Freemyer


On Wed, Dec 7, 2016 at 3:39 PM, Brian Inglis
 wrote:
> On 2016-12-07 13:12, Erik Soderquist wrote:
>>> I really like cygwin and have used it for a decade plus.  Only in the
>>> last year or 18-months have I noticed significant permission issues
>>> that slow down my workflow.
>>>
>>> Copying these folders/files from one drive to another is a task I'd
>>> like to accomplish, but even more importantly I'd like to understand
>>> how to work with permissions in cygwin.  As it is, I'm concerned I
>>> will have to leave cygwin behind and I don't want to do that.
>>
>> I've been a Windows and Linux admin for years, and Windows permissions
>> can be a pain, but can also be very granular.
>>
>> What I normally do for something like this is use robocopy's "backup mode"
>> switch to bypass permissions on the source entirely and intentionally not
>> copy the permissions to the destination, then set up the permissions I want
>> on the destination after the copy is complete.
>>
>> The "backup mode" option requires either backup operator or local admin
>> permissions to use.
>
> Concur and recommend for local copies:
>
> robocopy src dst /s /sl /xj /copyall /zb /nfl /ndl /np /mt:8 /r:0 /w:0
>
> to copy non-empty directories; keep winsymlinks as is; skip junctions;
> all info; backup fallback; no file, directory, or progress logging;
> 8 threads, no retries, no waits: use /copy (like cp -p) instead of
> /copyall to skip security info.
>
> --
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
>
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>

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



Re: permission question

2016-12-07 Thread Brian Inglis
On 2016-12-07 13:12, Erik Soderquist wrote:
>> I really like cygwin and have used it for a decade plus.  Only in the
>> last year or 18-months have I noticed significant permission issues
>> that slow down my workflow.
>>
>> Copying these folders/files from one drive to another is a task I'd
>> like to accomplish, but even more importantly I'd like to understand
>> how to work with permissions in cygwin.  As it is, I'm concerned I
>> will have to leave cygwin behind and I don't want to do that.
> 
> I've been a Windows and Linux admin for years, and Windows permissions
> can be a pain, but can also be very granular.
> 
> What I normally do for something like this is use robocopy's "backup mode"
> switch to bypass permissions on the source entirely and intentionally not
> copy the permissions to the destination, then set up the permissions I want
> on the destination after the copy is complete.
> 
> The "backup mode" option requires either backup operator or local admin
> permissions to use.

Concur and recommend for local copies:

robocopy src dst /s /sl /xj /copyall /zb /nfl /ndl /np /mt:8 /r:0 /w:0

to copy non-empty directories; keep winsymlinks as is; skip junctions; 
all info; backup fallback; no file, directory, or progress logging; 
8 threads, no retries, no waits: use /copy (like cp -p) instead of 
/copyall to skip security info.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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



Re: permission question

2016-12-07 Thread Erik Soderquist
> I really like cygwin and have used it for a decade plus.  Only in the
> last year or 18-months have I noticed significant permission issues
> that slow down my workflow.
>
> Copying these folders/files from one drive to another is a task I'd
> like to accomplish, but even more importantly I'd like to understand
> how to work with permissions in cygwin.  As it is, I'm concerned I
> will have to leave cygwin behind and I don't want to do that.

I've been a Windows and Linux admin for years, and Windows permissions
can be a pain, but can also be very granular.

What I normally do for something like this is use robocopy's "backup mode"
switch to bypass permissions on the source entirely and intentionally not
copy the permissions to the destination, then set up the permissions I want
on the destination after the copy is complete.

The "backup mode" option requires either backup operator or local admin
permissions to use.

-- Erik

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



Re: permission question

2016-12-07 Thread Greg Freemyer
On Wed, Dec 7, 2016 at 1:48 PM, Stephen John Smoogen  wrote:
>> I'm tempted to just do a "chmod 755 -R .", but I've just had too many
>> windows permission issues in the last year to start trying things
>> without guidance.
>
> That would probably make things worse. I believe that Windows
> permissions are like attribs in Linux (which moves it into witchcraft
> and sorcery). For dealing with this sort of issue I would look at
> using the xcopy that Glenn from dell mentioned.
>
>> Greg

I really like cygwin and have used it for a decade plus.  Only in the
last year or 18-months have I noticed significant permission issues
that slow down my workflow.

Copying these folders/files from one drive to another is a task I'd
like to accomplish, but even more importantly I'd like to understand
how to work with permissions in cygwin.  As it is, I'm concerned I
will have to leave cygwin behind and I don't want to do that.

Greg
--
Greg Freemyer

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



Re: permission question

2016-12-07 Thread Stephen John Smoogen
On 7 December 2016 at 13:22, Greg Freemyer  wrote:
> On Wed, Dec 7, 2016 at 10:47 AM, Greg Freemyer  
> wrote:
>> I have a USB drive with 100,000's of thousands of files I put on it
>> from one PC.  I've built that dataset up over a couple years.
>>
>> I moved the USB drive to a different PC and I'm trying to rsync it to
>> another drive.
>>
>> 99.9% of the data seems to have made its way from one drive to the other.
>>
>> But I got a few permission denied messages when reading files off of
>> the source drive.
>>
>> I really don't need anything but the equivalent of 666 permissions for
>> the source drive files.
>>
>> I know linux well, but I have screwed up Windows permissions once too often.
>>
>> Is there a command I should run in Windows or cygwin to grant my user
>> read/write permission to all of the files?
>>
>> Or I can parse the rsync log file I created and look for the handful
>> of files that failed with permission denied.
>>
>> Thanks
>
> It's worst than I thought.
>
> I used rsync -avP to make the copy of the folders / files.   (Its
> 2.5TB, so it took all day yesterday to run).
>
> I'm trying now to use "rsync -cvr" to compare the checksums of the
> source / destination and re-copy any that got corrupted.
>
> The trouble is lots of the destination files can't be read due to
> permission issues, so the compare doesn't match and the rsync is
> copying the same files again.
>
> I admit to having little understanding of the Windows / cygwin
> permissions integration.  Or even Windows permissions standalone.  I
> do understand Linux permissions well.
>
> I'm tempted to just do a "chmod 755 -R .", but I've just had too many
> windows permission issues in the last year to start trying things
> without guidance.

That would probably make things worse. I believe that Windows
permissions are like attribs in Linux (which moves it into witchcraft
and sorcery). For dealing with this sort of issue I would look at
using the xcopy that Glenn from dell mentioned.

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



-- 
Stephen J Smoogen.

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



Re: permission question

2016-12-07 Thread Greg Freemyer
On Wed, Dec 7, 2016 at 10:47 AM, Greg Freemyer  wrote:
> I have a USB drive with 100,000's of thousands of files I put on it
> from one PC.  I've built that dataset up over a couple years.
>
> I moved the USB drive to a different PC and I'm trying to rsync it to
> another drive.
>
> 99.9% of the data seems to have made its way from one drive to the other.
>
> But I got a few permission denied messages when reading files off of
> the source drive.
>
> I really don't need anything but the equivalent of 666 permissions for
> the source drive files.
>
> I know linux well, but I have screwed up Windows permissions once too often.
>
> Is there a command I should run in Windows or cygwin to grant my user
> read/write permission to all of the files?
>
> Or I can parse the rsync log file I created and look for the handful
> of files that failed with permission denied.
>
> Thanks

It's worst than I thought.

I used rsync -avP to make the copy of the folders / files.   (Its
2.5TB, so it took all day yesterday to run).

I'm trying now to use "rsync -cvr" to compare the checksums of the
source / destination and re-copy any that got corrupted.

The trouble is lots of the destination files can't be read due to
permission issues, so the compare doesn't match and the rsync is
copying the same files again.

I admit to having little understanding of the Windows / cygwin
permissions integration.  Or even Windows permissions standalone.  I
do understand Linux permissions well.

I'm tempted to just do a "chmod 755 -R .", but I've just had too many
windows permission issues in the last year to start trying things
without guidance.

Greg

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



RE: permission question

2016-12-07 Thread Gluszczak, Glenn

I've found recently while using cp or rsync that the Administrator account 
could not access files or set back permissions for files with System account 
privileges.
I had to resort to xcopy to do things properly.

-Original Message-
From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of 
Greg Freemyer
Sent: Wednesday, December 07, 2016 10:48 AM
To: cygwin@cygwin.com
Subject: permission question

I have a USB drive with 100,000's of thousands of files I put on it from one 
PC.  I've built that dataset up over a couple years.

I moved the USB drive to a different PC and I'm trying to rsync it to another 
drive.

99.9% of the data seems to have made its way from one drive to the other.

But I got a few permission denied messages when reading files off of the source 
drive.

I really don't need anything but the equivalent of 666 permissions for the 
source drive files.

I know linux well, but I have screwed up Windows permissions once too often.

Is there a command I should run in Windows or cygwin to grant my user 
read/write permission to all of the files?

Or I can parse the rsync log file I created and look for the handful of files 
that failed with permission denied.

Thanks
Greg
--
Greg Freemyer

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



permission question

2016-12-07 Thread Greg Freemyer
I have a USB drive with 100,000's of thousands of files I put on it
from one PC.  I've built that dataset up over a couple years.

I moved the USB drive to a different PC and I'm trying to rsync it to
another drive.

99.9% of the data seems to have made its way from one drive to the other.

But I got a few permission denied messages when reading files off of
the source drive.

I really don't need anything but the equivalent of 666 permissions for
the source drive files.

I know linux well, but I have screwed up Windows permissions once too often.

Is there a command I should run in Windows or cygwin to grant my user
read/write permission to all of the files?

Or I can parse the rsync log file I created and look for the handful
of files that failed with permission denied.

Thanks
Greg
--
Greg Freemyer

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



file permission question

2006-05-07 Thread chen li
Dear all,

I am new to Cygwin. When I try to execute a  file call
example.exe I get such message:

bash: ./first.exe: Permission denied

so I use chmod a+rx to change the file permisssion and
here is the result:
-rwxrwxrwx  1 chen41 mkgroup-l-d 11241 May  6 18:40
first.exe.

But when I type ./first.exe(or first) I still get the
same message: 

bash: ./first.exe: Permission denied.


What am I supposed to do now?

Thank all for the help,

Li



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
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/



Re: file permission question

2006-05-07 Thread Larry Hall (Cygwin)

chen li wrote:

Dear all,

I am new to Cygwin. When I try to execute a  file call
example.exe I get such message:

bash: ./first.exe: Permission denied

so I use chmod a+rx to change the file permisssion and
here is the result:
-rwxrwxrwx  1 chen41 mkgroup-l-d 11241 May  6 18:40
first.exe.

But when I type ./first.exe(or first) I still get the
same message: 


bash: ./first.exe: Permission denied.


What am I supposed to do now?




First, please read and follow the problem reporting guidelines given at:

Problem reports:   http://cygwin.com/problems.html



Without the basic configuration information that the guidelines recommend
providing, people on this list are going to have guess about some important
factors of your installation.

I'd recommend starting with regenerating your /etc/group file like this:

mkgroup -l -d /etc/group

This may or may not be enough to get things working as you expect them to
but it's definitely an area that the information you did give points to.



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746

--
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/