You are not logged in.

#1 2004-08-13 02:28:42

cs25x
Member
Registered: 2004-05-04
Posts: 150

core utils bug?

:!:
using wombat, 2.6.7 and coreutils 5.2.1

chown -R foo:users .*

goes down to / and changes ( or tries to change ) ownership on every directory and file in the root tree.
:shock:
I wondered why it was taking so long.
This is wrong, it should only touch things above cwd, and it should only change those that are hidden .

chown -R foo:users *

behaves as it should.

:!:


--(*(cs25x--));

Offline

#2 2004-08-13 03:14:55

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: core utils bug?

".." (parent dir) falls in to ".*", so it goes backwards.

That's my guess.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#3 2004-08-13 04:19:57

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: core utils bug?

I dont think it did that before.
It is reasonable to expect that .. is not covered by .*, 
How else can you recursively alter hidden files and folders?

There was an old Peanut, about 8.3 that was messed & that is the only time that I have seen it before. IIRC the problem was that somebody ripped out a ".." test, and it was not just chown, it was all of that family that use -R for recursion.


--(*(cs25x--));

Offline

#4 2004-08-13 07:38:45

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: core utils bug?

To change dot files you need something like

chown -R foo:users .[^.]*

Offline

#5 2004-08-13 08:15:02

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: core utils bug?

I just installed Slackware 10.0 on a spare partition, and it behaves the way it should.

chown -R foo:users .* 

should not change every file in the system.
roll


--(*(cs25x--));

Offline

#6 2004-08-13 15:02:42

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: core utils bug?

Either way, the regexp expansion is happening in bash, not in coreutils.  Is slackware using bash 3.0 like we are?


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#7 2004-08-13 20:01:49

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: core utils bug?

Slackware is using bash 2.05b


--(*(cs25x--));

Offline

Board footer

Powered by FluxBB