a*******e 发帖数: 3021 | 1 俺有2台电脑,一台linux,一台windows,
windows上的文件考到u盘上,然后从u盘上再考到linux上,这时候linux上的文件属性
就是
-rwxr-xr-x, 比较烦人,有什么办法能让从 U盘上或者samba上考到linux上的文件属
性默认是
-rw------- ? | E*V 发帖数: 17544 | 2 chmod -R
【在 a*******e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 俺有2台电脑,一台linux,一台windows, : windows上的文件考到u盘上,然后从u盘上再考到linux上,这时候linux上的文件属性 : 就是 : -rwxr-xr-x, 比较烦人,有什么办法能让从 U盘上或者samba上考到linux上的文件属 : 性默认是 : -rw------- ?
| a*******e 发帖数: 3021 | 3 俺知道,俺是不想一个一个的改
就想哪里有个啥设置,以后从u盘上考到linux上的文件linux自动给我用-rw-------属性
就像现在似乎默认设置是-rwxr-xr-x一样
反正u盘一般都是fat32
【在 E*V 的大作中提到】![](/moin_static193/solenoid/img/up.png) : chmod -R
| E*V 发帖数: 17544 | 4 不知道,你知道,报告一下
这个好像fat32的权限比较差,没有相应位
你可以在copy上作文章
例如umask 077
属性
【在 a*******e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 俺知道,俺是不想一个一个的改 : 就想哪里有个啥设置,以后从u盘上考到linux上的文件linux自动给我用-rw-------属性 : 就像现在似乎默认设置是-rwxr-xr-x一样 : 反正u盘一般都是fat32
| E*V 发帖数: 17544 | 5 man cp
Ithink you can find the solution
【在 E*V 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 不知道,你知道,报告一下 : 这个好像fat32的权限比较差,没有相应位 : 你可以在copy上作文章 : 例如umask 077 : : 属性
| E*V 发帖数: 17544 | 6 -P, --no-dereference
never follow symbolic links in SOURCE
-p same as --preserve=mode,ownership,timestamps
--preserve[=ATTR_LIST]
preserve the specified attributes (default: mode,ownership,
timestamps), if possible additional attributes:
context, links, xattr, all
--no-preserve=ATTR_LIST
don't preserve the specified attributes
【在 E*V 的大作中提到】![](/moin_static193/solenoid/img/up.png) : man cp : Ithink you can find the solution
| a*******e 发帖数: 3021 | 7 斯阿斯阿
这个就是改linux在不知道相应位的时候的默认设置就是了
【在 E*V 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 不知道,你知道,报告一下 : 这个好像fat32的权限比较差,没有相应位 : 你可以在copy上作文章 : 例如umask 077 : : 属性
| a*******e 发帖数: 3021 | 8 that's not the root cause of it.
it is the default owner/mode setting when mounting a usb or samba drive i
believe.
It was said that, the ownership of a usb drive was set when the drive was
mounted (also the files on it).
more /etc/udev/rules.d/10-vboxdrv.rules
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"
Do you think this 0664 mode is
【在 E*V 的大作中提到】![](/moin_static193/solenoid/img/up.png) : -P, --no-dereference : never follow symbolic links in SOURCE : -p same as --preserve=mode,ownership,timestamps : --preserve[=ATTR_LIST] : preserve the specified attributes (default: mode,ownership, : timestamps), if possible additional attributes: : context, links, xattr, all : --no-preserve=ATTR_LIST : don't preserve the specified attributes
|
|