⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 009.htm

📁 LINUX的操作系统分析文件和使用文件
💻 HTM
📖 第 1 页 / 共 2 页
字号:
value). Nakamichi MBR-7 的七片装及先锋牌的 12 片装已确定能用. <br><br>EIDE/ATAPI 的多片机种也能使用. 2.0 版核心对一些机器使用 CDROMLOADFROMSLOT 这个 ioctl 函式做了初步支援. IDECD 驱动程式的文件档包含了一个原始码可做一般程式选择换片槽的参考. 或者你也可以找最新版的 eject 程式. <br><br>6.12. 我收到 ``/cdrom: Permission denied'' 错误 <br>有些 CD 有档案权限, 仅允许 root 读取它. 1995 年三月的 InfoMagic CD set 就是一个好例子. 这真的是很不方便. <br><br>底下的修补, 由 Christoph Lameter(clameter@waterf.org) 好心提供, 用它修补核心, 解决这问题. <br><br><br>From: clameter@waterf.org (Christoph Lameter) <br>Newsgroups: comp.os.linux.setup <br>Subject: Infomagic Developers Set: Fix for CD-Rom permissions <br>Date: 12 Apr 1995 20:32:03 -0700 <br>Organization: The Water Fountain - Mining for streams of Living Water <br>NNTP-Posting-Host: waterf.org <br>X-Newsreader: TIN [version 1.2 PL2] <br><br>The March 1995 Edition of the Infomagic Developers CD-ROM Set has <br>problems because the information stored in the root directory <br>permissions is causing the following problems with using the CDs <br><br>(1995年三月版的InfoMagic Developers CD-ROM set有问题,因为它在根目录存取权限处 <br>存的资讯造成以下使用CD的问题.) <br><br>1. Disc1 will always have the owner/group of 5101/51 and has write <br>access allowed (?) <br><br>(1. 第一片的拥有者/群组是5101/51,然後居然允许写入(?)) <br><br>2. Disc2 and 3 have rwx set for root and no rights at all for any <br>other group/user. These discs cannot be accessed from any user other <br>than root! I run a BBS and I need to make them accessible for download <br>by others. <br><br>(2. 第二,三片对root有rwx权力,而对其它人/群组什麽也不给. 这两片光碟除了 <br>root外任何人均无法存取! 我正在跑BBS,需要让别人能下载它们!) <br><br>I have seen several fixes to this problem already floating <br>around. Trouble is that these fixes usually change the rights for ALL <br>directories on the CD. This fix here changes ONLY the rights for the <br>root directory of the CD-Rom. If you want to run parts of Linux <br>directly off the CD you might run into trouble if all directories are <br>readable for everyone and if they are all owned by root. <br><br>(我已经看到这问题的几个解决之道了. 麻烦的是它们会影响光碟上所有目录的 <br>存取权.我的修正只改了它的根目录存取权. 如果你想在光碟上跑东东,而所有目录 <br>都可存取的话,会带来麻烦,因为他们是root所有.) <br><br>This fix will set the rights for the root directory to r-xr-xr-x and <br>the owner/group to the values indicated in the uid and gid options to <br>the mount command. <br><br>(这个修补会将根目录权限改成r-xr-xr-x,将所有人/群组改成mount那人的 <br>uid及gid) <br><br>To apply:(用法:) <br>cd /usr/src/linux/fs/isofs <br>patch &lt;**THIS MESSAGE** <br><br>and recompile kernel (you may have to fix up the patch by hand <br>depending on your kernel version). <br>(然後重编译核心(依你的核心版本,可能要手动修补.)) <br><br>This fix should probably be incorporated into the kernel. What business <br>does data on a CD have to mess around with the permissions/owners of the <br>mount-point anyways? <br>(这个修正也许已放进核心了. 到底是什麽事,非要存放让挂载点的权限/所有人资料 <br>变一团糟呢?) <br><br>--- inode.c.ORIG Wed Apr 12 17:24:36 1995 <br>+++ inode.c Wed Apr 12 17:59:12 1995 <br>@@ -552,7 +552,15 @@ <br>these numbers in the inode structure. */ <br><br>if (!high_sierra) <br>- parse_rock_ridge_inode(raw_inode, inode); <br>+ { parse_rock_ridge_inode(raw_inode, inode); <br>+ /* check for access to the root directory rights/owner CL */ <br>+ if((inode-&gt;i_sb-&gt;u.isofs_sb.s_firstdatazone) == inode-&gt;i_ino) <br>+ { /* Change owner/rights to the ones demanded by the mount command */ <br>+ inode-&gt;i_uid = inode-&gt;i_sb-&gt;u.isofs_sb.s_uid; <br>+ inode-&gt;i_gid = inode-&gt;i_sb-&gt;u.isofs_sb.s_gid; <br>+ inode-&gt;i_mode = S_IRUGO | S_IXUGO | S_IFDIR; <br>+ } <br>+ } <br><br>#ifdef DEBUG <br>printk(&quot;Inode: %x extent: %x\n&quot;,inode-&gt;i_ino, inode-&gt;u.isofs_i.i_first_extent); <br>@@ -805,4 +813,3 @@ <br>} <br><br>#endif <br>- <br><br><br>注意以上的修补有些旧了, 可能无法完全乾净地修补最新的2.0版核心, 也请参考本篇後面提到的隐藏档的相关问题. <br><br>6.13. 我如何读懂 IDE CD 的核心错误讯息? <br>核心送给我的 IDE CD-ROM 驱动程式讯息像: ``hdxx: code: xx key: x asc: xx ascq: x'',这是什麽意思? <br><br>这是 IDE CD-ROM 的状态/错误报告. 预设状况下, IDECD 印出最原始的资讯, 而不浪费核心空间给错误讯息. 你可以改变它, 让它显示真正的错误讯息. 修改 /usr/src/linux/drivers/block/ide-cd.c , 将 VERBOSE_IDE_CD_ERRORS 改成 1, 并重编译核心. <br><br>6.14. 我如何测试我的 CD-ROM 是几倍速的呢? <br>有一个办法, 就是测试它要花多久读取 1500K 的资料: <br><br>% time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500 <br>1500+0 records in <br>1500+0 records out <br>real 5.24 <br>user 0.03 <br>sys 5.07 <br><br>正常的单倍速 CD-ROM 每秒传送 150KB, 所以约要 10 秒钟. 二倍速约要 5 秒钟, 四倍速的约 2.5 秒钟等等... real 时间也许是最好的值 -- 在上面情形指出它是二倍速机器. 你可以增加资料量得出更准确的值. (如果你担心受快取影响的话.)你也许应该多测几次, 求平均值. <br><br>6.15. 装好 Linux 後, 我的 CD-ROM 不能用了 <br>最常见的症状是先用 Linux 安装时, Linux 承认你的 CD-ROM. 但装完後, 从软碟或硬碟开机却又不能用它了. <br><br>最大的可能就是多数 Linux 套件中, 装在硬碟的核心不一定就是和安装片用的一样. 你选了支援你设备的安装片, 它却给你在硬碟上装一个没有支援 CD-ROM 的 ``通用版''核心. 你可以照第四章所说的 ``问题与解决'' 去做. (从检查 /proc/devices 开始) <br><br>解法是重编译核心, 确定你需要的 CD-ROM 驱动程式及其它需要的部份(如 SCSI 卡, ISO-9660 档案系统)都编进去了. 如果你不知道怎麽做, 看 Kernel HOWTO <br><br>如果你安装时用了命令列参数(如``hdc=cdrom'')你要把它加进开机载入程式的设定档中(通常是 /etc/lilo.conf) <br><br>6.16. 在 CD 上有隐藏档, 我没办法读... <br>有些 CD 的一些档案有设定隐藏位元. 这些档案正常状态是看不到的. 不过如果你挂上时用了 &quot;unhide&quot; 选项, 那麽应该就可以读取了.(这个选项似乎没有文件记载过) <br><br>6.17. 哪儿找得到CD-ROM API的文件资料? <br>如果你想写自己的应用程式, 诸如CD唱片播放程式等, 你必须懂得Linux提供的应用程式介面(application programming interface, API) <br><br>原本CD-ROM核心驱动程式都是用自定的ioctl以支援这类机器的功能. 像 /usr/include/linux/sbpcd.h 这样的标头档就描述了这些. 由於很多驱动程式都是由别的驱动程式发展而来, 介面虽不完全相同, 但类似之处颇多. <br><br>最近, 由David van Leeuwen(david@tm.tno.nl) 发起, 建立一组CD-ROM用的共通 API. 这文件在 /usr/src/linux/Documentation/cdrom/cdrom-standard.tex. 已有几个核心驱动程式支援它了. 我预计下一个主要版本核心 (3.0?) 里, 所有 CD-ROM驱动程式都会符合这API. <br><br>我的书, Linux Multimedia Guide, 也提到了如何写CD-ROM程式, 特别是放音方面的. 请看&quot;参考文献&quot;那节. <br><br>6.18. 为什麽我不能看到Windows CD-ROM的长档名? <br>如果你有一片CD-ROM, 上面有Windows可看到, 但Linux看不到的长档名, 那麽这片光碟可能是使用Microsoft专属的Joliet档案系统格式. 请看下一个问题. <br><br>6.19. Linux支援Microsoft的Joliet档案系统吗? <br>Microsoft制定了一种叫Joliet的ISO CD-ROM档案系统延伸格式. 在写这篇时, 对Joliet 的支援正进行中, 可以在 http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html 或 ftp://www-plateau.cs.berkeley.edu/pub/multimedia/linux/joliet/ 找到修补档. </p><hr SIZE="0"><p align="center"><a href="linux.htm">返回</a></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -