file-permissions

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(

How do I locate and perform a command on all executable files matching a given pattern?

筅森魡賤 提交于 2019-12-25 04:17:41
问题 How I identify all files on my Unix (OS X) system matching a particular pattern that have their executable bit set, so that I can perform a command on them? For example, I'd like to locate all .doc files created before a given date that have any executable bit set, and chmod a-x them. 回答1: Something like find . -name '*.doc' -perm +0111 -exec chmod a-x ''{}'' ";" It will depend on exactly what you mean by "executable". 来源: https://stackoverflow.com/questions/29922883/how-do-i-locate-and

Changing default file permissions for files created by PHP

风流意气都作罢 提交于 2019-12-25 04:01:39
问题 I have an Amazon EC2 server with multiple user accounts. Each user installs a PHP-based CMS system which during the install process downloads a few packages from a remote repository. The problem is that downloaded packages are not writable for the user (ei. cannot be deleted). Question is, how can I set the default file permission for files created by PHP to 666? Many thanks! 回答1: You can use find to find all of the files that are owned by apache and then chmod them with the desired

Why Dropbox causes PostgreSQL permission denied errors?

…衆ロ難τιáo~ 提交于 2019-12-25 03:02:43
问题 I installed postgresql-common and postgresql-9.4 with the package manager apt-get . I changed my database system from OSX to Debian 8.1 after which I have had difficulties with Permission denied errors. The user postgres exists ( CREATE USER postgres; ) and database detector exists CREATE DATABASE detector WITH OWNER=postgres; ). I run successfully masi@pc212:~$ sudo -u postgres psql detector -c "DROP TABLE measurements;"DROP TABLE masi@pc212:~$ sudo -u postgres psql detector -c "CREATE TABLE

php can't open or write file despite 777 permisions

坚强是说给别人听的谎言 提交于 2019-12-25 01:55:11
问题 My php script is unable to write a file despide 777 permission. the file i want to write is mash.xml -rwxrwxrwx. 1 root root 459 May 16 2010 config.xml -rwxrwxrwx. 1 root root 323 May 16 2010 handler.xml -rwxrwxrwx. 1 root root 13908 Mar 15 12:18 mash.xml -rwxrwxrwx. 1 root root 494 May 17 2010 media_audio.xml -rwxrwxrwx. 1 root root 13967 Feb 15 07:40 media_effect.xml -rwxrwxrwx. 1 root root 312 May 16 2010 source.xml i checked the following issue : - same user as file uploader, var_dump(get

Permission denied when opening file with file_get_contents; webbrowser can open it without problems

久未见 提交于 2019-12-25 01:44:58
问题 When using file_get_contents() to get the file contents of a text file on an FTP server at ftp://ipaddress/somefile.txt , I'm getting the following error: Warning : file_get_contents() [function.file-get-contents]: connect() failed: Permission denied in filename.php on line 1 But when I access ftp://ipaddress/somefile.txt within my webbrowser, it's absolutely no problem. Why can my browser open the text file, but can file_get_contents() not? PS: I don't know if it has something to do with it,

AppDomain shadow copied file access denied with ASP.NET site running on IIS6

三世轮回 提交于 2019-12-25 00:22:53
问题 I have some trouble with the shadow copy feature of AppDomains in combination with a ASP.NET website running under IIS. The problem is that the shadow copied files can not be read or executed by the IIS user because of insufficient permissions. I get the following error message when the code in the new AppDomain is executed (through a callback method via DoCallBack): System.IO.FileLoadException: Could not load file or assembly 'My.Namespace.AssemblyName, Version=0.0.3.2231, Culture=neutral,

Android API below 19 equivalent for ContentResolver takePersistableUriPermission

浪尽此生 提交于 2019-12-24 17:17:15
问题 I use this to let the user select file, after the selection I store in shared prefs only the URI of the file. In the future the user can open this file - So I have the URI and therefore it can be done final Intent intent = new Intent(); if (Integer.valueOf(android.os.Build.VERSION.SDK_INT) >= 19) { intent.setAction(Intent.ACTION_OPEN_DOCUMENT); } else { intent.setAction(Intent.ACTION_GET_CONTENT); } intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("application/msword,application

Set file permission in java 5

久未见 提交于 2019-12-24 15:11:20
问题 I am using the below code to upload image. The problem is that after uploading the image i cant change the file permission. my file permission set by default is rw-r--r-- ( 0644 ). Is it possible to change the file permission or set it as 0777 by default? It works fine in my local system. But not able to change the permission in my linux server. <% try { int filesize=0; String fieldname="",fieldvalue="",filename="",content="",bookid="",bkdescription=""; try { List<FileItem> items = new

Saving files with Windows programs makes Git in Cygwin track filemode changes

混江龙づ霸主 提交于 2019-12-24 12:44:00
问题 I am currently developing with Cygwin, Git in Cygwin and a Windows editor under Windows. It is quite annoying that saving files from native Windows programs makes a file executable in Cygwin. I want to track filemodes as we have Unix executables but updating files from Windows just shoudn't change the existing mode. I'd accept setting filemode once in Cygwin before committing the file the first time. I read https://cygwin.com/cygwin-ug-net/using-filemodes.html but I'm on NTFS and I don't know