public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Phil Smith <phil@voltage.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Possible chmod problem with a path
Date: Mon, 30 Mar 2015 14:17:00 -0000	[thread overview]
Message-ID: <84BCCD71182F0046BCD2FB054FE52379197703FDDD@HQMAILSVR02.voltage.com> (raw)

The short description is that chmod *with a path* says it works, but doesn't. If I cd to the directory and do it from there, it works. 

This behavior *seems* to have started recently, after I installed gawk (and in the process updated some other Cygwin bits). Our scaffolding for some cross-platform builds uses Cygwin (and CMake), and I started having permissions problems with the build artifacts on my machine.

I've tried with both forward and backslashes. In the examples below, the path is longish, but I can reproduce it to C:\temp as well. A colleague with an older Cygwin cannot reproduce it. Of course it's possible this is Windows somehow having become confused, but it's hard to see how (but then, it's Windows...OK, I'm looping).

I've read the FAQ and searched the archives as best I can -- there are lots of hits for "chmod" and "path", of course.

Any suggestions (besides "reformat and reinstall Windows") welcome.

Environment:
Windows 7 Professional, fully patched, 64-bit, Genuine Intel.

uname -r 1.7.35(0.287/5/3)

Asterisked lines are my comments:

* OK, I'm in C:\SVN\zFPE610:
C:\SVN\zFPE610>cat ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1
cat: ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1: Permission denied

* Let's chmod:
C:\SVN\zFPE610>chmod -v 777 C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/*
mode of 'C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/VSHPCRT1' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx)

* Nope:
C:\SVN\zFPE610>cat ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1
cat: ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1: Permission denied

* Let's look:
C:\SVN\zFPE610>ls -l ZFP-BUILD-2015-03-27-001/Updated/*
----rwx---+ 1 phsiii None 6800 Mar 27 15:24 ZFP-BUILD-2015-03-27-001/Updated/VSHPCRT1

* That sneaky chmod lied!

* Let's go to the directory:
C:\SVN\zFPE610>cd C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/

* Nope, as expected:
C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>cat VSHPCRT1
cat: VSHPCRT1: Permission denied

* Now let's chmod again from there:
C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>chmod 777 *

* Hey, it works!
C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>cat VSHPCRT1
¦Q¦@@X¦¦^G¦¦b¦¦¦¦¦¦¦¦¦¦a¦¦a¦¦¦¦K¦¦@@@Ö¦¦¦¦¦¦¦@¦¦¦¦`¦¦¦¦¦¦¦¦¦¦¦¦¦¦@@¦8@@¦8@@

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

             reply	other threads:[~2015-03-30 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 14:17 Phil Smith [this message]
2015-03-30 14:38 ` Andrey Repin
2015-03-30 15:35   ` Possible chmod problem with a path [WARNING: SPF validation failed] Phil Smith
2015-03-30 16:21     ` Andrey Repin
2015-03-30 17:48       ` Phil Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84BCCD71182F0046BCD2FB054FE52379197703FDDD@HQMAILSVR02.voltage.com \
    --to=phil@voltage.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).