file-permissions

PHP mkdir issue!

别说谁变了你拦得住时间么 提交于 2020-01-14 22:46:30
问题 I trying to create some dirs like this: @mkdir("photos/$cat/$sku", 0777, true) it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third. A workaround this please? Thanks, Richard. 回答1: This solved the issue: $a = @mkdir("photos/$cat/", 0777); @chmod("photos/$cat/", 0777); $b = @mkdir("photos/$cat/$sku/", 0777); @chmod("photos/$cat/$sku/", 0777); but why can't use recursive on mkdir? 回答2: I did this and it

PHP mkdir issue!

主宰稳场 提交于 2020-01-14 22:45:52
问题 I trying to create some dirs like this: @mkdir("photos/$cat/$sku", 0777, true) it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third. A workaround this please? Thanks, Richard. 回答1: This solved the issue: $a = @mkdir("photos/$cat/", 0777); @chmod("photos/$cat/", 0777); $b = @mkdir("photos/$cat/$sku/", 0777); @chmod("photos/$cat/$sku/", 0777); but why can't use recursive on mkdir? 回答2: I did this and it

How to control the file permissions when the netbeans php plugin uploads a file with FTP

做~自己de王妃 提交于 2020-01-14 09:04:38
问题 Whenever netbeans preforms an ftp upload the files are uploaded with the permissions set to 640. This causes PHP to throw the following error: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/Library/WebServer/Documents/notes/index.php' (include_path='.:/usr/local/php5/lib/php') in Unknown on line 0 While I can clean it up with a quick chmod o+r ./* in the command prompt it causes netbeans to resynchronize the

VB.NET app is setting restricted file permissions on a directory, which is incorrectly restricting user created files in the same directory

空扰寡人 提交于 2020-01-14 02:51:09
问题 My VB.NET application builds a tree of directories with restricted access. The access should be that a normal user can not delete or rename the existing tree. But the user can add new files/folders anywhere in the tree. A user created file/folder should be fully modifiable by any user. The problem I'm having is getting access set so that files/folders created by the app can't be changed, but files/folders created by users can be changed by any user. What is currently happening, is the files

Cannot copy file, even though FileIOPermission is granted in C#

不羁岁月 提交于 2020-01-13 11:26:53
问题 I was trying out the FileIOPermission in Windows 7 in .NET 3.5. I have been a Windows XP user and was granted this permission as I was an administrator I wrote the following code, testing to see if I could write to C:\Program Files\Outlook...... static void Main(string[] args) { Console.WriteLine("Am I an administrator? " + new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator); // Try and open a file in C:\Program Files\Microsoft Office\Office14

“Permission Denied” trying to run Python on Windows 10

泪湿孤枕 提交于 2020-01-12 11:22:18
问题 Seems as though an update on Windows 10 overnight broke Python. Just trying to run python --version returned a "Permission Denied" error. None of the three updates; KB4507453, KB4506991, or KB4509096 look like they'd be the culprit but the timing of the issue is suspicious. Rather than messing with rolling back, I'm hoping there's a simpler fix that I'm missing. The permissions on python are "-rwxr-xr-x" and I haven't changed anything besides letting the Windows update reboot machine after

PHP Create directory with permissions of another

你说的曾经没有我的故事 提交于 2020-01-11 14:15:15
问题 I would like to create a directory $one with the permissions of $another: mkdir($one, fileperms($another)); It seems to me that the above could doesn't work correctly. Please help me find the problem. I also tried: mkdir($one); chmod($one, fileperms($another)); edit to clarify $one = "/tmp/somedir" $another = "/tmp/anotherdir" 回答1: fileperms($another) is not returning what you expect it to, there is much more information than you need. From the docs - on most platforms the return value will

File system permissions

时间秒杀一切 提交于 2020-01-07 09:34:42
问题 It was a cms and I would like to set all my files on server to -rw------- This will make my website working as usual? or they will not read each other, for example i have this: require_once 'include/checksession.php'; 回答1: First, you need to understand what each "segment" means. first triad what the owner can do second triad what the group members can do third triad what other users can do Your permission set ( -rw------- ) only has permissions on the first triad - the owner of the file -

Giving File permissions and running ProcessBuilder in Java Servlets

你。 提交于 2020-01-07 05:26:09
问题 I have tried coding a servlet which creates a file based on the inputs given to it.The file gets created along with appropriate text but I am unable to give the file 777 permissions and I am also unable to run ProcessBuilder later. I thought it is inter related because the command fired in ProcessBuilder would require the file to have appropriate permissions but when I try giving it permissions using chmod it doesn't work either. import java.io.*; import java.util.Enumeration; import javax

compare windows file (or folder) permissions

半腔热情 提交于 2020-01-07 05:03:28
问题 I occasionally migrate some website from one web server to another. After copying all files from the old server to the new server, it takes me quite some time to get (re)acquainted with which folders or files need to be writable by IIS. (Sounds familiar, by the way ? :) ) I have written a WinForms application that allows me to select a starting directory. The application should (recursively) compare if the security permissions of each file/directory are equal to that of its parent directory.