chmod

Giving permission to a ftp FILE java

点点圈 提交于 2019-12-25 05:46:09
问题 i have a class in android that connect with the ftp, and store an image, that works perfect the problem is when i am trying to move the image to another directory( i use a php page to moderate that image) it doesnt have permission to handle it, i want to put the permission to 0777 but only the "java code" can do it but i dont know how, I am using FTPClient library this is my code File imageFile = new File(url[0]); FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getByName(

hue 用户权限分配

一世执手 提交于 2019-12-25 02:55:27
hue 用户权限分配 一、问题背景 CDH集群原来在使用hue部署oozie工作流的时候发现不能够运行工作流,因为当时hue创建用户时设置root为初始用户,而root用户不属于supergroup组,不能够调用集群中任何组件,为了解决这个问题,当时查参考了 CDH权限不够,修改用户和用户组为root 这篇文章的做法后面来看,只是治标不治本,并没有完全解决后面hue中如果设置其他用户后,其他用户所具有的权限问题,也没有深入讲解CDH组件用户权限问题。 今天这篇文章讲解的几个点 : 如何将集群内部组件恢复到原来的设置,并且让现在拥有的root用户继续能够调用工作流 在hue中添加新的用户,并让新的用户具有调用其他组件的权限 那个用户才是hue默认的初始用户 二 、恢复集群默认设置 1. 各个组件目录所属用户以及权限恢复到默认 /var/log 目录下涉及目录所属用户修改 sudo chown -R hdfs:hadoop /var/log/hadoop-hdfs sudo chown -R mapred:hadoop /var/log/hadoop-mapreduce sudo chown -R yarn:hadoop /var/log/hadoop-yarn sudo chown -R httpfs:httpfs /var/log/hadoop-httpfs sudo chown

六、Linux 文件基本属性

你离开我真会死。 提交于 2019-12-25 02:52:00
Linux 文件基本属性 Linux系统是一种典型的多用户系统,不同的用户处于不同的地位,拥有不同的权限。为了保护系统的安全性,Linux系统对不同的用户访问同一文件(包括目录文件)的权限做了不同的规定。 在Linux中我们可以使用ll或者ls –l命令来显示一个文件的属性以及文件所属的用户和组,如: [root@www /]# ls -l total 64 dr-xr-xr-x 2 root root 4096 Dec 14 2012 bin dr-xr-xr-x 4 root root 4096 Apr 19 2012 boot …… 实例中,bin文件的第一个属性用"d"表示。"d"在Linux中代表该文件是一个目录文件。 在Linux中第一个字符代表这个文件是目录、文件或链接文件等等。 当为[ d ]则是目录 当为[ - ]则是文件; 若是[ l ]则表示为链接文档(link file); 若是[ b ]则表示为装置文件里面的可供储存的接口设备(可随机存取装置); 若是[ c ]则表示为装置文件里面的串行端口设备,例如键盘、鼠标(一次性读取装置)。 接下来的字符中,以三个为一组,且均为『rwx』 的三个参数的组合。其中,[ r ]代表可读(read)、[ w ]代表可写(write)、[ x ]代表可执行(execute)。 要注意的是,这三个权限的位置不会改变

how to set permission 777 to a zip file?

瘦欲@ 提交于 2019-12-25 02:18:33
问题 I am trying to zip files and I want to set the permission to chmod 777. But i don't know how/where I should write the chmod 777. Could anyone please help me? This is my code for zipping files. $files = array( 'download.xml', 'script_.xml', ); $zip = new ZipArchive(); $zip_name = "testabc.package"; if($zip->open($zip_name, ZIPARCHIVE::CREATE)!==TRUE){ $error .= "* Sorry ZIP creation failed at this time"; } foreach($files as $file){ $zip->addFile($file); } $zip->close(); echo shell_exec("zip -P

How to run Nodejs Server from PHP script?

故事扮演 提交于 2019-12-24 06:35:58
问题 I have a PHP server which is the main application. I have a Nodejs Server which is a sub-application. Nodejs Server is used for a Notification Mechanism. I want to be able to disable the notification mechanism from my main application which runs on PHP. There is a button. On clicking it, I change my Nodejs config file and now I want to restart Nodejs server. I imagine I can do something like this in PHP: exec("kill sudo lsof -t -i:4849 "); exec("node server.js"); Prospective problems: 1

How can I CHMOD files/directories on Windows Azure?

你离开我真会死。 提交于 2019-12-23 21:05:49
问题 I am using FileZilla FTP to right click and change a directories File Permissions as I do on many other sites/servers. For some reason this is not working in Windows Azure. It outputs in FileZilla "500 'SITE CHMOD 777 (mydirectory)': command not understood" Any ideas? 回答1: I found a hack solution to delete files on Azure: Stop your website from the management console (https://manage.windowsazure.com) Open up the FTP site in Filezilla Rename the directory that has the problem to anything else

linux用户、组、权限问题

限于喜欢 提交于 2019-12-23 13:08:15
用户、组、权限 一、权限:r, w, x 1.文件权限: r:可读,可以使用类似cat等命令查看文件内容; w:可写,可以编辑或删除此文件; x: 可执行,eXacutable,可以命令提示符下当作命令提交给内核运行; 2.目录权限: r: 可以对此目录执行ls以列出内部的所有文件; w: 可以在此目录创建文件; x: 可以使用cd切换进此目录,也可以使用ls -l查看内部文件的详细信息; 3.权限三位一体: rwx:可读可学可执行 r--:只读 r-x:读和执行 ---:无权限 4.八进制表示: 0 000 ---:无权限 1 001 --x: 执行 2 010 -w-: 写 3 011 -wx: 写和执行 4 100 r--: 只读 5 101 r-x: 读和执行 6 110 rw-: 读写 7 111 rwx: 读写执行 例如:755:rwxr-xr-x rw-r-----: 640 660:rw-rw---- rwxrwxr-x:775 二、用户和用户组 1.用户和组的文件路径: 用户:UID, /etc/passwd 组:GID, /etc/group 2.影子口令:(真正口令文件路径) 用户:/etc/shadow 组:/etc/gshadow 3.用户类别: 管理员:0 普通用户:1-65535 系统用户:1-499 一般用户:500-60000 4.用户组类别:

is not in the sudoers file. This incident will be reported

廉价感情. 提交于 2019-12-23 10:50:29
What 我用的是CentOS6.3,在一般用户下执行sudo命令提示 “(我的用户名) is not in the sudoers file. This incident will be reported.” How 解决方法: 一、$whereis sudoers 找出文件所在的位置,默认都是/etc/sudoers 二、#chmod u+w /etc/sudoers 以超级用户登录su ,修改文件权限即添加文件拥有这的写权限,ls -al /etc/sudoers 可以查看原文件的权限。 三、vi /etc/sudoers 编辑文件,在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX为你的用户名。添加方法:找到root行,按下”i“键进入编辑模式添加即可!编辑好后esc键进入一般模式,“:wq"保存退出! 最后, #chmod u-w /etc/sudoers 回到文件的原权限! Why 详细: 在ubuntu中由于禁用了root用户,默认情况下会把安装系统时建立的用户添加到sudoers中。但在redhat系中并没有把任何root用户之外的用户默认的添加到sudoers之中。这样我们在执行sudo 命令时就会出现xxx is not in the sudoers file. This incident will be reported

Linux shell脚本基础 条件测试 for循环(Engineer01----DAY8)

妖精的绣舞 提交于 2019-12-23 06:50:08
什么脚本:一个可以执行文件,运行后可以实现某种功能 创建用户zhangsan useradd zhangsan 案例:书写hello.sh脚本 [root@server0 ~]# vim /root/hello.sh echo hello world [root@server0 ~]# /root/hello.sh -bash: /root/hello.sh: 权限不够 [root@server0 ~]# chmod +x /root/hello.sh [root@server0 ~]# ls -l /root/hello.sh [root@server0 ~]# /root/hello.sh hello world ####################################################### 规范Shell脚本的一般组成 • #! 环境声明,以下代码由那个程序进行翻译 • # 注释文本 • 可执行代码 1)输出当前红帽系统的版本信息 2)输出当前使用的内核版本 3)输出当前系统的主机名 [root@server0 ~]# vim /root/hello.sh #!/bin/bash echo hello world cat /etc/redhat-release uname -r hostname ifconfig | head -2 [root

Cygwin chmod 777 command made other users 'access denied' in Windows 7

南笙酒味 提交于 2019-12-23 05:22:19
问题 I am administrator of a Windows 7 system, created some spreadsheets (.CVS files) and changed the permission of those files by CHMOD 777 command (from CYGWIN console), so that other users can get full access to read and write. But, after the permission changed to (chmod 777), other users (non administrators) can't get access to those files, it errors 'access denied'. In the recent past, I did similar file permission change in Windows XP without any problem, why it is happening in Windows 7 ?