chmod

Chmod 777 to a folder and all contents [duplicate]

断了今生、忘了曾经 提交于 2019-11-27 16:33:31
This question already has an answer here: How do I change permissions for a folder and all of its subfolders and files in one step in Linux? [closed] 16 answers I have a web directory /www and a folder in that directory called store . Within store are several files and folders. I want to give the folder store and all files and folders within the store folder all permissions. How do I do this? I am guessing via .htaccess. petervaz If you are going for a console command it would be: chmod -R 777 /www/store . The -R (or --recursive ) options make it recursive. Or if you want to make all the files

【ASM】如何创建ASM磁盘

老子叫甜甜 提交于 2019-11-27 16:14:52
【ASM】如何创建 ASM 磁盘 blog 文档结构图: 1 前言 无论是安装单机版的 asm 还是 rac 都离不开 ASM 磁盘组的创建,创建 ASM 磁盘组的关键是创建好需要的 asm 磁盘,发现很多网友安装 grid 软件和 grid 实例,都在磁盘的创建这里有很大的问题,本人又是喜欢总结的人,那么今天我就总结了下各种创建 asm 磁盘的方法,以备大家查阅。 之前的 2 篇文章中用到了 asm 磁盘的创建,连接如下: Oracle 单实例 ASM+11gR2 安装 : http://blog.itpub.net/26736162/viewspace-1205206/ 在 vmware workstations + rhel6.5 下 一步一步搭建 oracle 11gR2 rac+dg : http://blog.itpub.net/26736162/viewspace-1328156/ 2 创建 asm 磁盘的各种方法 2.1 方法一: Faking 方式 该方法不需要添加额外的磁盘,直接在已有的磁盘上来创建,本人推荐的方法之一。 ------------------------ 直接贴脚本, root 用户下执行 mkdir -p /oracle/asmdisk dd if=/dev/zero of=/oracle/asmdisk/disk1 bs=1024k

面试题-4

拈花ヽ惹草 提交于 2019-11-27 16:00:51
1.使用"ls -l /"以长格式查看根目录,显示头十位文件权限信息,写出每一位所代表的含义 drwxr-xr-x d:目录 rwx: 属主 r-x: 属组 r-x: 其他人 rwx ---->>>读写执行 2.linux系统存放所有用户密码信息的文件是? /etc/shadow /etc/passwd 3.存放用户账户信息的配置文件是? /etc/default/useradd /etc/login.defs 4.改变文件所有者的命令为B A.chmod B.chown C.cat D.vim 5.新建一个1.txt文件,文件内容如下 1123 1122 112233 321 3306 8080 80 23 21 8081 8082 8085 (1)显示1.txt第3行到第10行的内容(三种方法) [root@chengyinwu ~]# sed -n '3,10p' 1.txt [root@chengyinwu ~]# tail 1.txt |head -8 [root@chengyinwu ~]# awk 'NR==3,NR==10' 1.txt (2)显示1.txt第3行和第10行的内容 [root@chengyinwu ~]# awk 'NR==3 ||NR==10' 1.txt [root@chengyinwu ~]# sed -n '3p;10p' 1.txt (3

用户组和权限管理

半腔热情 提交于 2019-11-27 15:26:22
                           用户组和权限管理 介绍安全3A 资源分派: Authentication:认证 Authorization:授权 Accouting|Audition:审计 用户user 令牌token,identity Linux用户:Username/UID 管理员:root, 0 普通用户:1-60000 自动分配,r人工分配可以60000以上 系统用户:1-499, 1-999 (CentOS7)   对守护进程获取资源进行权限分配 登录用户:500+, 1000+(CentOS7)   交互式登录 组group Linux组:Groupname/GID 管理员组:root, 0 普通组:··   系统组:1-499, 1-999(CENTOS7)   普通组:500+, 1000+(CENTOS7) 安全上下文 Linux安全上下文   运行中的程序:进程 (process) 以进程发起者的身份运行:   root: /bin/cat   mage: /bin/cat 进程所能够访问资源的权限取决于进程的运行者的身份 #rm ./-f1 //删除-f1文件 #rm -- -f1 //删除-f1文件 组的类别 Linux组的类别  用户的主要组(primary group)     用户必须属于一个且只有一个主组     组名同用户名

用户组和权限管理

血红的双手。 提交于 2019-11-27 15:26:17
                           用户组和权限管理 介绍安全3A 资源分派: Authentication:认证 Authorization:授权 Accouting|Audition:审计 用户user 令牌token,identity Linux用户:Username/UID 管理员:root, 0 普通用户:1-60000 自动分配,r人工分配可以60000以上 系统用户:1-499, 1-999 (CentOS7)   对守护进程获取资源进行权限分配 登录用户:500+, 1000+(CentOS7)   交互式登录 组group Linux组:Groupname/GID 管理员组:root, 0 普通组:··   系统组:1-499, 1-999(CENTOS7)   普通组:500+, 1000+(CENTOS7) 安全上下文 Linux安全上下文   运行中的程序:进程 (process) 以进程发起者的身份运行:   root: /bin/cat   mage: /bin/cat 进程所能够访问资源的权限取决于进程的运行者的身份 #rm ./-f1 //删除-f1文件 #rm -- -f1 //删除-f1文件 组的类别 Linux组的类别  用户的主要组(primary group)     用户必须属于一个且只有一个主组     组名同用户名

Linux CenOS 7 权限命令

泄露秘密 提交于 2019-11-27 12:59:59
修改拥有者 chown chown 拥有者名称 文件名 修改组 chgrp chgrp 组名 文件名 修改权限 chmod chmod 权限 文件名 修改拥有者 chown chown 拥有者名称 文件名 修改组 chgrp chgrp 组名 文件名 修改权限 chmod chmod 权限 文件名 来源: https://www.cnblogs.com/lszw/p/11364190.html

特殊权限位:suid、sgid、sticky

别说谁变了你拦得住时间么 提交于 2019-11-27 12:41:17
linux系统特殊权限位 suid、sgid、sticky suid 使任意用户获得用文件属主相同的权限,sgid使用户获得与文件属组相同的权限(通过sgid获得的权限等同于同一用户组的权限) 表示方法: suid、sgid属于特殊权限位,位于基础权限位的x权限位置,s表示有x权限,S表示无x权限。 sticky属于特殊权限位,位于基础权限位的x权限位置,t表示有x权限,T表示无x权限。 [root@ 55test ts]# ll /usr/bin/passwd -rwsr-xr-x. 1 root root 27832 Jun 10 2014 /usr/bin/passwd [root@ 55test ts]# ll /etc/shadow ----------. 1 root root 904 Oct 10 23:39 /etc/shadow    设置suid、sgid方法:suid数字权限为4,sgid数字权限为2,sticky数字权限为1 chmod u+s a.sh      #添加suid chmod u-s a.sh      #取消suid chmod 4755 a.sh     #添加suid chmod 0755 a.sh     #取消suid chmod g+s a.sh      #添加sgid chmod g-s a.sh      #取消sgid

Creating executable files in Linux

被刻印的时光 ゝ 提交于 2019-11-27 11:39:47
One thing I plan to be doing is writing (painfully simple) Perl scripts, and I'd like to be able to run them without explicitly calling Perl from the terminal. I appreciate that, to do this, I need to grant them execute permissions. Doing this with chmod is easy enough, but it also seems like a slightly laborious extra step. What I would like is one of two things: Firstly, is there a way to set the execute flag when saving a file? Currently I'm experimenting with gedit and geany, but would be willing to switch to a similarly- (or better-) featured editor if it had this capability. Failing that

Cannot change permissions of folders within vagrant home folder

ぃ、小莉子 提交于 2019-11-27 10:36:42
When I ssh in to my vagrant vm, I can change permissions of files and folders above and outside the vagrant user folder, and for files within the vagrant user folder. But cannot change permissions for folders under the vagrant user folder. I have the same problem whether logged in as the vagrant user and root. Is there some sort of restriction on changing permissions in the vagrant user's folder? The vagrant user folder is not shared with the host OS, but the capistrano deploy folder and the docRoot are. Guest is CentOS 6, Host is OS X 10.7. Vagrant is 1.0.5. Virtualbox is 4.2.1. Greg Elin The

How do i secure a web server's image upload directory?

可紊 提交于 2019-11-27 10:11:30
问题 For my web application, people can upload images from a web form to my web server. What should I set the CHMOD settings for that image upload directory so that people can upload images (from the web server) to that directory but not execute any files they upload for security reasons. Would the chmod settings be? : chmod 744 directory/ 回答1: There are two possible meanings for "executable" in this context, and both are things you need to configure against. An executable binary file that may run