WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'  (Read 3025 times)

Offline adb014

  • Newbie
  • *
  • Posts: 16
Great release, and I have no particular problems. But I did notice annoying warning messages like

Code: [Select]
chown: warning: '.' should be ':': 'tc.staff'

in a number of scripts. These appear to be due to a deprecation of 'chown user.group' in 6.x kernels. The most annoying happens at boot. Could tc-functions be modified with

Code: [Select]
sed -i -e 's/USER".staff/USER":staff/g' /etc/init.d/tc-functions

Other fixes needed are

Code: [Select]
sed -i -e 's/\(chown.*\)\.staff/\1:staff/g' /usr/bin/tce-setup
sed -i -e 's/\(chown.*\)\.staff/\1:staff/g' /usr/bin/tce-setdrive

But there are probably others as well

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #1 on: April 19, 2023, 09:32:52 AM »
I don't see that? Are you using GNU chown?

edit: Pushed the change, as it doesn't hurt.
« Last Edit: April 19, 2023, 09:36:49 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #2 on: April 20, 2023, 08:46:50 AM »
Hi curaga
I just noticed it today booting TC14 x86_64:


aus9

  • Guest
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #3 on: April 20, 2023, 07:01:28 PM »
I wonder if this is relevant to the tc:staff report by Rich?

Code: [Select]
root@box:/home/tc# ls -al /root
total 16
drwxrwxr-x    2 root     staff          120 Apr 21 01:55 .
drwxr-xr-x   17 tc       staff          400 Apr 21 01:21 ..
-rw-rw-r--    1 root     staff          248 Apr 12 15:38 .Xdefaults
-rw-------    1 root     root            16 Apr 21 01:56 .ash_history
-rw-r--r--    1 root     root            29 Dec 29 15:24 .bashrc
-rw-rw-r--    1 root     staff          278 Apr 12 15:38 .profile

and if that is true then maybe this is true for ONE of the  root:staff

Code: [Select]
ls -al /usr/local/tc.installed | less
drwxrwxr-x    2 root     staff         4200 Mar 25  2021 ./
drwxr-xr-x   10 1000     staff          200 Mar 25  2021 ../
SNIP


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #4 on: April 20, 2023, 07:33:19 PM »
Hi aus9
I wonder if this is relevant to the tc:staff report by Rich? ...
A. No, it's about using a colon instead of a period between OWNER and GROUP
   as a field separator when executing chown.
Q. What's wrong with using a period?
A. A USER or GROUP name can contain a period.
Q. Can't a name contain a colon?
A. No. That would break /etc/passwd which uses a colon as the field separator.

aus9

  • Guest
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #5 on: April 20, 2023, 07:50:13 PM »
yes I should have spotted the period.

my bad

Offline sloan

  • Newbie
  • *
  • Posts: 1
Re: Tinycore 14.0 : chown: warning: '.' should be ':': 'tc.staff'
« Reply #6 on: September 23, 2023, 09:20:12 PM »
I have successfully cover this problem by change default tc-functions just like bellow when remaster "core.gz".

It is that add "&> /dev/null" to the line which has "chown -R "$USER".staff /home/"$USER/"" in it.
note.because restore mydata is after that script, so only change "/etc/init.d/tc-functions" and backup to mydata.tgz will not work. must remaster "core.gz" or "corepure64.gz".

Code: [Select]
/tmp/ezremaster/extract/etc/init.d/tc-functions
Code: [Select]
root@box:~$ cat/tmp/ezremaster/extract/etc/init.d/tc-functions | grep "chown -R"
      chown -R "$USER".staff /home/"$USER/" &> /dev/null
do chown -R "$USER".staff /home/"$USER"/"${ITEM%%/*}" &> /dev/null
« Last Edit: September 23, 2023, 09:30:59 PM by sloan »