Cygwin/Bash File Copy and File Access ‘Gotcha’

For those of you who, like me, make use of Cygwin and Bash, beware that when you copy a file with cp in a Bash shell rather than copy in a DOS box (Command Prompt), you might find that some programs or services have trouble accessing those files because the user that they’re running as does not have the appropriate (read or write) permissions for the copied file.

The two commands handle ACLs (access control lists) differently.

Therefore, I recommend that when copying such a file on the Bash command line, you consider using the DOS command copy, not a Bash command.

[Cygwin is configurable with respect to ACLs. See for example Cygwin’s setting up documentation.]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: