Shell scripts should not use absolute paths for programs

There is a certain habit in shell scripts of referring to uncommonprograms by their absolute path; for example, if you need to run lsof ,people will write ' /usr/sbin/lsof .... ' in their shell script. Wedo a certain amount of that here, and then recently one of our shellscripts started reporting:

netwatch: line 15: /usr/sbin/lsof: No such file or directory

You see, you shouldn't do this, because every so often


Some stuff on NFS access restrictions

Roughly speaking, there's two sorts of access restrictions that an NFSserver can put on a client: what filesystems the client can access,and what directories in the filesystems the client can access (this isnecessary when you export a subdirectory in the filesystem, instead ofthe whole filesystem).

(This ignores just firewalling off the client entirely. The NFS servercode generally doesn't have any special handling for this, because fromits perspective, not allowing someone to talk at all is functionallyidentical to not


小雲小雲小小雲

初遇小雲,她在山坡後向我揮手。

Continue reading...

HDFA謝師宴


Continue reading...

隨便說說


世界並不是非黑即白,可是有些人喜歡把別人描述成黑,把自己美化成白,換個角度看,這也是一種霸道吧!

在另一個blog刪了一些留言,那又是一次古怪的經驗,作者把意見寫出來是要跟讀者分享,如果讀者喜歡可以看下去,若

A brief history of NFS server access restrictions

In the beginning, NFS servers had no access restrictions. No, really.

In the early versions of NFS, the kernel NFS code had no access checks;if you had a valid filehandle , the kernelwas happy to talk to you, regardless of who you were. What NFS accessrestrictions existed were all done during the NFS mount process ; if you were not authorized to mount the particular thingyou were asking for, mountd would not give you a filehandle forit. This was, of course, secure only


寶萊塢在明周


出門時想起張帝莊, 他應該還未完成那份稿罷. 兩星期前到重慶二樓找Mabel, 她還透露張兄不夠資料完成訪問. 路經報攤, 報販正在整理報刊. 一瞥, Bollywood的專題原來已出了街!

自己無份出鏡, 並不介懷 (自覺上鏡的樣子更差). 倒
Continue reading...

What can go wrong in making NFS mounts

Now that we know what goes on in NFS mounts , wecan see that there are any number of moving parts that can go wrong:

  • the RPC portmapper refuses to talk to you (possibly because a firewallgets in the way, possibly because it has been set up with tcpwrappersbased restrictions).
  • the NFS mount daemon refuses to talk to you, possibly because itusually insists that clients use a reserved port , or there could be another firewallproblem since it uses a different port than the portmapper.

  • the NFS mount

瞎子交友

瞎子交友

波姬小絲當年這樣拒絕米高積遜的求婚:「我對他說:『你一輩子都不會失去我,你毋須跟我結婚。我會有我的生活,我會結婚,會生兒育女,但你不會失去我』。」非常感人。擺明老點,但依然感人。

我不會跟你結婚


再危險一點

(下文見七月的《elle》。病了一輪、推掉一些工作之後,總算可以多看點書了。此書得劉美兒協力方才得到,誌謝。)

Continue reading...