Sudden file permission change.

It is the second time within a couple of months I notice a sudden file permission change.
A file with the -rw-rw-r-- pattern gets the -rwx------ one during a routine copy procedure. The ownership and the group remain intact.

QNX v4.25G
TCP/IP v5.0

What may be the cause?

A third incident was very long ago with a directory being turned into a regular file…

Tony.

Tony <mts.spb.suxx@mail.ru> wrote:

It is the second time within a couple of months I notice a sudden file
permission change.
A file with the -rw-rw-r-- pattern gets the -rwx------ one during a
routine copy procedure. The ownership and the group remain intact.

QNX v4.25G
TCP/IP v5.0

What may be the cause?

I note you mention TCP/IP – are you using NFS?

I’ve seen some file-caching problems with NFS (well, actually caused
by the fact that NFS assumes inodes won’t be quickly re-used, where nothing
specifies such, and QNX can allow quick inode reuse for a different file,
and NFS assumes that if the inode is the same, the file must be the same
in its cache, when that might not be the case). Is the data content of the
files undamaged?


Have you run a chkfsys on the filesystem in question to make sure
there is no corruption? Do you run chkfsys every boot?

Otherwise, I’ve never heard of anything like what you’re describing.

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

My colleague ( qnx begginer ) did the same thing: after recursive copy of
directory copied files ( or directories? - I’m not sure ) have -rwx------
file permition. The problem was that he was using wrong option parameter in
“cp” command. Unfortunately he doesn’t remember exact options he was using
:frowning:

I’m quite sure your problem was only typo ( overstriking ) in your command.

“Tony” <mts.spb.suxx@mail.ru> wrote in message
news:opsdlsjffro93ri4@mobile.wst.quantum.ru

It is the second time within a couple of months I notice a sudden file
permission change.
A file with the -rw-rw-r-- pattern gets the -rwx------ one during a
routine copy procedure. The ownership and the group remain intact.

QNX v4.25G
TCP/IP v5.0

What may be the cause?

A third incident was very long ago with a directory being turned into a
regular file…

Tony.

On 2 Sep 2004 03:00:52 GMT, David Gibbs <dagibbs@qnx.com> wrote:

I note you mention TCP/IP – are you using NFS?
No, no NFS used.
Have you run a chkfsys on the filesystem in question to make sure
there is no corruption? Do you run chkfsys every boot?
Yes, I allways put “chkfsys -P /dev/hd0t77” in every sysinit file.

On Thu, 2 Sep 2004 08:43:39 +0200, Martin Michalek <michalek@procaut.sk> wrote:

My colleague ( qnx begginer ) did the same thing: after recursive copy of
directory copied files ( or directories? - I’m not sure ) have -rwx------
file permition. The problem was that he was using wrong option parameter in
“cp” command.
Yes, I was copying a group of files from one directory to another in a script:

cp -f $dir/.mg $ARC_DIR

Both variables do resolve correctly, the script itself is run on behalf of a valid user (non-root). The user has write permission on target directory. In that target directory may be some files not belonging to the user in question, but he has group write permission too. After I removed “-f” option - the problem did not happen in several thousands test-runs.

Thanks!

Tony.