ROX不理umask?(已解决)

其它类软件,非上述版软件
回复
头像
adam8157
帖子: 2794
注册时间: 2009-03-05 16:31
联系:

ROX不理umask?(已解决)

#1

帖子 adam8157 » 2009-05-04 18:59

设置umask 077

但是rox里新建的文件夹和文件不按这个来啊....

记得以前讨论libtrash时,有人说过x下的程序不理bashrc,这也正常,但是怎么解决呢?
上次由 adam8157 在 2009-05-05 13:45,总共编辑 1 次。
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: ROX不理umask?

#2

帖子 HuntXu » 2009-05-04 21:35

这rox不是从终端里启动出来的吧?
改077的umask那不是只有root才能用了?
我是在fstab里直接指定mask的...
HUNT Unfortunately No Talent...
头像
adam8157
帖子: 2794
注册时间: 2009-03-05 16:31
联系:

Re: ROX不理umask?

#3

帖子 adam8157 » 2009-05-05 13:02

owner 也能用,搞不清fstab的umask,貌似和新建文件的umask的不一样,是另外一层权限过滤...

对了,我试试在.profile里加上...呵呵
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: ROX不理umask?

#4

帖子 HuntXu » 2009-05-05 13:08

难道你说的是终端里的umask?
那rox肯定不管的
The umask utility shall set the file mode creation mask of the current shell execution environment (see Shell Excution Environment ) to the value specified by the mask operand.
HUNT Unfortunately No Talent...
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: ROX不理umask?

#5

帖子 eexpress » 2009-05-05 13:10

那是。面板上启动的,还不认PATH呢。
● 鸣学
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

Re: ROX不理umask?

#6

帖子 BigSnake.NET » 2009-05-05 13:15

umask 只是一个建议
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

Re: ROX不理umask?

#7

帖子 BigSnake.NET » 2009-05-05 13:18

adaml 写了:owner 也能用,搞不清fstab的umask,貌似和新建文件的umask的不一样,是另外一层权限过滤...

对了,我试试在.profile里加上...呵呵
umask 是对里面的文件再 mask 一次,通常用于不支持权限的文件系统。
例如挂在 FAT 的区时,如果不设 umask,全部都变可执行了
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
adam8157
帖子: 2794
注册时间: 2009-03-05 16:31
联系:

Re: ROX不理umask?

#8

帖子 adam8157 » 2009-05-05 13:44

解决,哈哈哈 :em11

https://www.linuxquestions.org/question ... ...-64961/

Okay, so you want to extend this to other programs etc. I cant think of many non-CLI ( or X based ) programs that would let you enter shell commands from inside( where umask and ENV VARS do control stuff), apart from gnome-console, xterm , the other x-terminal emulation programs and now gvim. But whatever floats your boat I guess.

Do you start the X server from the command line ( runlevel 3 ) or do you use a graphical login like xdm, gdm etc ( runlevel 5 ) ? I use runlevel 3. If you prefer to do the same, you can make your ~/.xinitrc a bash script, export your ENV VARS, set your umask etc, followed by startup programs in the background and finally your window-manager or desktop-env.

Something like..
Code:

#!/bin/bash

umask 077
export FOO=bar

#wmxmms --title --single &
#root-tail -g 250x25+100+50 /var/log/httpd/access_log,CornFlowerBlue &
xset b off
xscreensaver -no-splash &
aterm -geometry 80x24+100+50&
aterm -geometry 80x24+615+50&
gkrellm -w &
fluxter -w &
xmodmap ~/.Xmodmap
exec /usr/bin/fluxbox # my Window Manager

If you're on runlevel 5, you should create such a file, name it appropriately, chmod u+x and put it in a location where your Display Manager would look for it. For GDM it is /etc/X11/gdm/Sessions for Redhat. If Debian uses xdm, you can save it as your ~/.xsession or even symlink it to point to .xinitrc, so it will work no matter what runlevel.
nxny is offline Reply With Quote
onelynx
帖子: 817
注册时间: 2008-11-13 16:03

Re: ROX不理umask?(已解决)

#9

帖子 onelynx » 2009-05-29 18:04

还是mc好
头像
adam8157
帖子: 2794
注册时间: 2009-03-05 16:31
联系:

Re: ROX不理umask?(已解决)

#10

帖子 adam8157 » 2009-09-03 23:23

077编译和打包会有问题, 例如sudo的补全什么的..

所以编译和打包时记得现将目录改为755,里面的文件改为644....




设置所有文件及目录权限为Private
chmod -R go-rwx ~

设置所有目录权限为755
find ~/ -type d -exec chmod 755 {} \;

设置所有文件权限为644
find ~/ -type f -exec chmod 644 {} \;

设置所有可执行文件或目录权限为755
find ~/ -executable ! -perm 700 -exec chmod 755 {} \;

设置所有不可执行文件或目录权限为644
find ~/ ! -executable ! -perm 600 -exec chmod 644 {} \;
上次由 adam8157 在 2009-11-24 21:20,总共编辑 1 次。
回复