chmod

PHP mkdir 0777 fail chmod 0777 works

£可爱£侵袭症+ 提交于 2019-11-28 00:45:09
问题 using PHP 5.2.14, this is what happens [user@VE213 public_html]$ php -r "mkdir('directory', 0777);" [user@VE213 public_html]$ ls -lt drwxrwxr-x 2 rankranger rankranger 4096 Dec 8 17:28 directory [user@VE213 public_html]$ php -r "chmod('directory', 0777);" [user@VE213 public_html]$ ls -lt drwxrwxrwx 2 rankranger rankranger 4096 Dec 8 17:28 directory Did not find any related bugs in the php bug list, any idea? 回答1: $old = umask(0); mkdir($dir,0777); umask($old); Read this, http://php.net/manual

CentOS7.4安装SVN和可视化管理工具iF.SVNAdmin

给你一囗甜甜゛ 提交于 2019-11-28 00:15:39
一、安装Apache和PHP yum install httpd php 二、安装SVN yum install subversion mod_dav_svn 三、查看版本号: svnserve --version 四、创建SVN repo目录和权限信息目录 mkdir /var/www/svn mkdir /var/www/svnconfig 五、创建SVN权限文件和密码文件 touch /var/www/svnconfig/accessfile touch /var/www/svnconfig/passwdfile 六、安装iF.SVnAdmin 下载:svnadmin-1.6.2.zip文件 wget http://sourceforge.net/projects/ifsvnadmin/files/svnadmin-1.6.2.zip/download 解压: unzip svnadmin-1.6.2.zip 把解压后的文件 iF.SVNAdmin-stable-1.6.2 拷贝到 /var/www/html/svnadmin cp -r iF.SVNAdmin-stable-1.6.2/ /var/www/html/svnadmin 更改data目录的读写模式 chmod -R 777 /var/www/html/svnadmin/data/ 更改 /var/www

免密操作

只愿长相守 提交于 2019-11-27 23:37:43
[root@hadoop1 ~]# ssh-keygen -t rsa 四步回车 [root@hadoop1 ~]# cd .ssh [root@hadoop1 .ssh]# cat id_rsa.pub >> authorized_keys 修改权限 [root@hadoop1 ~]# chmod 700 ~/.ssh [root@hadoop1 ~]# chmod 600 ~/.ssh/authorized_keys 测试免密: [root@hadoop1 ~]# start-dfs.sh 不需要输入密码则配置免密成功 来源: https://www.cnblogs.com/lazhaoqian/p/11380893.html

PHP: get_current_user() vs. exec('whoami')

江枫思渺然 提交于 2019-11-27 21:39:39
问题 Short version of the question: What's the difference between get_current_user(); and exec('whoami'); ? Long version of the question: I'm on a XAMPP Localhost on a Mac. I'm using Apache, building a PHP based website in a folder (let's call it folderxyz ) within the htdocs folder (var/www in some flavors of Linux+Apache). I was playing around with a database connection, testing out PDO::ERRMODE_EXCEPTION described here: Link And I got this error: file_put_contents( PDOErrors.txt ): failed to

WEB扫描器Atscan的安装和使用

佐手、 提交于 2019-11-27 20:58:51
项目地址:https://github.com/AlisamTechnology/ATSCAN root@sch01ar:/sch01ar# git clone https://github.com/AlisamTechnology/ATSCAN root@sch01ar:/sch01ar# cd ATSCAN/ && ls root@sch01ar:/sch01ar/ATSCAN# chmod +x atscan.pl root@sch01ar:/sch01ar/ATSCAN# chmod +x ./install.sh root@sch01ar:/sch01ar/ATSCAN# ./install.sh 安装的时候一直回车选择默认选项,安装完成后 查看参数 root@sch01ar:~# atscan --help 对目标站进行sql注入检测 root@sch01ar:~# atscan -t "http://www.baidu.com" --sql 来源: http://www.cnblogs.com/sch01ar/p/7795887.html

【Linux下权限控制之chmod与chown命令】

南笙酒味 提交于 2019-11-27 20:56:42
"> ## chmod 用于配置文件/目录权限 命名格式: chmod [选项] 文件/目录名 . 权限类别: r 读取 可用数字 4 表示 w 写入 可用数字 2 表示 x 执行 可用数字 1 表示 . 归属类别: u 属主 g 属组 o 其它 a 所有人 . 操作符: + 给指定类别添加指定权限(例如+x或a+x表示允许所有人执行) - 删除指定类别的指定权限 = 重新定义指定类别的指定权限 . 示例 : chmod 755 file 给file文件重新定义权限为:属主rwx,属组rx,其它rx chmod -R a-w file 递归删除file目录及子目录的所有w权限 chown 用于更改文件/目录的属主和属组 命令格式: chown [参数] 用户名.组名 file 参数的话可使用 -R 递归,原理同上示例 " 来源: https://www.cnblogs.com/zyk01/p/11376451.html

【Linux下权限控制之chmod与chown命令】

北城余情 提交于 2019-11-27 17:17:10
原文: http://blog.gqylpy.com/gqy/316 "> ## chmod 用于配置文件/目录权限 命名格式: chmod [选项] 文件/目录名 . 权限类别: r 读取 可用数字 4 表示 w 写入 可用数字 2 表示 x 执行 可用数字 1 表示 . 归属类别: u 属主 g 属组 o 其它 a 所有人 . 操作符: + 给指定类别添加指定权限(例如+x或a+x表示允许所有人执行) - 删除指定类别的指定权限 = 重新定义指定类别的指定权限 . 示例 : chmod 755 file 给file文件重新定义权限为:属主rwx,属组rx,其它rx chmod -R a-w file 递归删除file目录及子目录的所有w权限 chown 用于更改文件/目录的属主和属组 命令格式: chown [参数] 用户名.组名 file 参数的话可使用 -R 递归,原理同上示例 " 原文: http://blog.gqylpy.com/gqy/316 来源: https://www.cnblogs.com/gqy02/p/11371265.html

笔试题目-9

橙三吉。 提交于 2019-11-27 16:58:56
2019/7/31 Linux运维工程师笔试题系列6(30题) – 运维派 www.yunweipai.com/archives/12464.html 1/5 1. cat -n file1file2 命令的意思是?B A 只会把文件file1的内容输出到屏幕上。 B 把文件file1和file2连在一起,然后输出到屏幕上。 C 创建文件file1和file2 D 把file2的内容输出到file1中并保存 2. Linux下查看服务程序占用的端口命令是什么?B A ps -aux B netstat –apn C watch D lsof 3. 对于Linux说法,下列说法正确的是()A A 线性访问内存非法时,当前线程会进入信号处理函数 B 用mv命令移动文件时,文件的修改时间会发生变化 C ulimit -c设置的是函数调用栈的大小 D malloc函数是应用程序向操作系统申请内存的接口 4. 在Linux系统上,下面那个命令不可以用来查看文件内容()B A cat B ls C less D more 5. 下面哪个命令可以从文本文件的每一行中截取指定内容的数据。D A cp B dd C fmt D cut 6. Linux下查看磁盘使用情况的命令是?B A dd B df C top D netstat 7. 设umask为002, 则新建立的文件的权限是什么?A A

【Linux下权限控制之chmod与chown命令】

不打扰是莪最后的温柔 提交于 2019-11-27 16:43:53
原文: http://blog.gqylpy.com/gqy/316 "> ## chmod 用于配置文件/目录权限 命名格式: chmod [选项] 文件/目录名 . 权限类别: r 读取 可用数字 4 表示 w 写入 可用数字 2 表示 x 执行 可用数字 1 表示 . 归属类别: u 属主 g 属组 o 其它 a 所有人 . 操作符: + 给指定类别添加指定权限(例如+x或a+x表示允许所有人执行) - 删除指定类别的指定权限 = 重新定义指定类别的指定权限 . 示例 : chmod 755 file 给file文件重新定义权限为:属主rwx,属组rx,其它rx chmod -R a-w file 递归删除file目录及子目录的所有w权限 chown 用于更改文件/目录的属主和属组 命令格式: chown [参数] 用户名.组名 file 参数的话可使用 -R 递归,原理同上示例 " 原文: http://blog.gqylpy.com/gqy/316 来源: https://www.cnblogs.com/bbb001/p/11370604.html

Change all files and folders permissions of a directory to 644/755

杀马特。学长 韩版系。学妹 提交于 2019-11-27 16:34:20
How would I change all files to 644 and all folders to 755 using chmod from the linux command prompt? (Terminal) hugo der hungrige One approach could be using find: for directories find /desired_location -type d -print0 | xargs -0 chmod 0755 for files find /desired_location -type f -print0 | xargs -0 chmod 0644 kenorb The easiest way is to do: chmod -R u+rwX,go+rX,go-w /path/to/dir which basically means: to ch ange file mod es -R ecursively by giving: u ser: r ead, w rite and e X ecute permissions, g roup and o ther users: r ead and e X ecute permissions, but not -w rite permission. Please