Re: OT: df command

From: Peter Ross <Peter.Ross(at)alumni.tu-berlin.de>
Date: Sat, 14 Sep 2013 10:02:36 +1000 (EST)

Hi Manfred,

On Fri, 13 Sep 2013, Manfred Lotz wrote:

> Hallo zusammen,
> Ich habe Zugriff auf ein z/OS mainframe system, welches auch eine Unix
> komponente hat, genannt z/OS Unix System Services. Dieses Unix ist
> POSIX compliant laut IBM.
>
> Dort verhält sich das df command so, dass man für bestimmte Mountpoints
> ein permission denied bekommt, also keine Information angezeigt
> bekommt, wenn man keine rx Permission hat für das Verzeichnis oben
> drüber.
>
> AIX, welches soweit ich weiss, auch POSIX compliant ist, gibt alle
> Informationen, auch wenn man nicht ausreichend Permission hat auf die
> Mountpoints. So wie BSD und Linux.
>
> Mir gefällt das Verhalten auf z/OS USS nicht, da es m. E. beim df um
> Metainformation geht und nicht um content der Filesysteme, wofür die
> Permissions da sind.

Unter Linux (Ubuntu):

root(at)AllInOne:~# mkdir -p /a/b/c
root(at)AllInOne:~# chmod 700 /a/b
root(at)AllInOne:~# mount /dev/sda1 /a/b/c
root(at)AllInOne:~# df
...
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 305478904 86346100 203608708 30% /a/b/c

Aber: Unpriviligierter Nutzer:

loungeroom(at)AllInOne:~$ df
df: ‘/a/b/c’: Permission denied
...

Das ist also hier genauso wie Du es auf dem Mainframe erlebst.

Hier hatte mich eher verwundert, daß ich mein Root-Verzeichnis nochmal
mounten konnte, unter FreeBSD bekomme ich bei dem Versuch: "Device busy"

Also habe ich fix mdconfig bemüht und dann gemountet:

root(at)DellT410two:~ # dd if=/dev/zero of=/tmp/disk bs=1m
count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.000990 secs (1059259757 bytes/sec)
root(at)DellT410two:~ # mdconfig -a -t vnode -f /tmp/disk
md0
root(at)DellT410two:~ # newfs /dev/md0
/dev/md0: 1.0MB (2048 sectors) block size 32768,
fragment size 4096
         using 1 cylinder groups of 1.00MB, 32 blks, 128 inodes.
super-block backups (for fsck_ffs -b #) at:
  192
root(at)DellT410two:~ # mkdir -p /a/b/c
root(at)DellT410two:~ # chmod 700 /a/b
root(at)DellT410two:~ # mount /dev/md0 /a/b/c
root(at)DellT410two:~ # df -t ufs
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0 828 8 756 1% /a/b/c
..
root(at)DellT410two:~ # logout

[petros(at)DellT410two ~]$ df -t ufs
df: /a/b/c stats possibly stale
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0 828 8 756 1% /a/b/c
..

Ich dachte zunächst: Nun gut, das heißt, ich sehe ich nichts unter /a/b -
deshalb sollte mir df unter Linux nicht das Verzeichnis /a/b/c verraten -
das tut es aber doch über die Fehlermeldungen.

Daß mich Linux nochmal das Root-Verzeichnis mounten läßt, finde ich
allerdings wirklich bedenklich..

Sind "z/OS Unix System Services" Linux-VMs? (wie LPARs auf
AS/400/iSeries/pSeries.. keine Ahnung, wie das heute gerade heißt - ich
habe seit 2007 keine "größere" IBM-Hardware mehr angefaßt)

Gruß
Peter

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sat 14 Sep 2013 - 02:02:47 CEST

search this site