file-permissions

Access Denied while using System.Diagnostics.Process

限于喜欢 提交于 2020-01-06 06:58:59
问题 I am trying to use the unmanaged ImageMagick library in my ASP.NET application from the command line using System.Diagnostics.Process. Basically, users will upload an .eps file to the site, and then I will run the command line command to convert it into .jpg. This is the code I'm using to try and run the command: Dim proc As New System.Diagnostics.Process proc.StartInfo.RedirectStandardOutput = True proc.StartInfo.RedirectStandardError = True proc.StartInfo.FileName = "C:\Program Files (x86)

General error: 1 Can't create/write to file errcode:2

自古美人都是妖i 提交于 2020-01-06 03:13:18
问题 I am trying to write a CSV file to /var/www/VistaMind_CMStmp and I get the error Message: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/VistaMind_CMS/tmp/app_users.csv' (Errcode: 2) I tried doing chown mysql:mysql /var/www/VistaMind_CMS/tmp , but that does not work. I do not want to modify my TMPDIR var in my.cnf, which is currently set to /var/www, but instead, I want MySQL to dump a database table to /var/www/VistaMind_CMS/tmp. Please help! My code is : $file_path = $this-

How can cron output to a new log file based on date?

风流意气都作罢 提交于 2020-01-06 01:55:08
问题 I'd like to log cron output to a dated file — /tmp/log/cron-2014-12-17.log $ mkdir /tmp/log $ chmod 777 /tmp/log $ ls -lah /tmp/log drwxrwxrwx 2 root root 4.0K Dec 17 21:51 . Cron (via root user) * * * * * /usr/bin/php /path/to/script.php > /tmp/log/cron-$(date "+%F").log 2>&1 /tmp/log remains empty after each minute. If I run the script manually from command line a log file is created, and output is as expected. // Running it manually as a CLI works fine, but not as a cron $ /usr/bin/php

permissions error running Console/cake

天大地大妈咪最大 提交于 2020-01-05 11:47:51
问题 I'm trying to run the cake console application for the first time. From the cake app folder I am running Console/cake then I get the following output PHP Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/virtual_host.com/public_html/lib/Cake/Cache/Engine/FileEngine.php on line 314 Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache

Setting Folder permissions on Vista

半世苍凉 提交于 2020-01-04 13:58:31
问题 I am trying to set the permissions of a folder and all of it's children on a vista computer. The code I have so far is this. public static void SetPermissions(string dir) { DirectoryInfo info = new DirectoryInfo(dir); DirectorySecurity ds = info.GetAccessControl(); ds.AddAccessRule(new FileSystemAccessRule(@"BUILTIN\Users", FileSystemRights.FullControl, InheritanceFlags.ContainerInherit, PropagationFlags.None, AccessControlType.Allow)); info.SetAccessControl(ds); } However it's not working as

Change file permissions with SFTP or SCP uing JSch

↘锁芯ラ 提交于 2020-01-04 05:30:45
问题 I have a user account, but on trying using this am getting exception for rssh. Is there any possibility to give permission of directory using other way other than ChannelExec . Based on the exception I come to know this account can't use ChannelExec to give permission of a directory or file. Thus is there any other way this account could give file permission without getting access to this user account for rssh . Please give you thoughts. Code : channelSftp = (ChannelSftp) channel; ChannelExec

How to check if a Windows file is readable/writable?

孤街浪徒 提交于 2020-01-03 20:05:10
问题 First off: I know that this isn't reliable for actually checking if I can write. I'm writing a file transfer client, and want feature parity between the "remote" and "local" file browser panes. I fully understand I will have to handle any permission related exceptions for any operation performed regardless; it's not a programming check it's just to display to the user. I've seen several examples for these posted, but everything I've tried either wasn't understandable or didn't work. I've

How to check if a Windows file is readable/writable?

此生再无相见时 提交于 2020-01-03 20:04:11
问题 First off: I know that this isn't reliable for actually checking if I can write. I'm writing a file transfer client, and want feature parity between the "remote" and "local" file browser panes. I fully understand I will have to handle any permission related exceptions for any operation performed regardless; it's not a programming check it's just to display to the user. I've seen several examples for these posted, but everything I've tried either wasn't understandable or didn't work. I've

Windows permissions on a directory: Mercurial - hg merge - “abort: access is denied”

元气小坏坏 提交于 2020-01-03 17:28:40
问题 Background: this is running on a Windows 2008 Server. https://www.mercurial-scm.org/wiki/Workflows#Feature_separation_through_named_branches I'm a Mercurial newbie, and am trying to follow the advice above where it says to "Merge default into your feature as often as possible" -- and I've done this a couple of times previously today, already, with other files. However, this newest change just won't merge. When I do the 'hg merge default' I get the error "abort: Access is denied". After

How to access /data folder of another application through your application?

五迷三道 提交于 2020-01-03 17:19:28
问题 there is a text file that an application produces, I would like to take that file and read it as strings in my application. How can I achieve that, any help would be grateful. Both applications are my applications so I can get the permissions. Thank you! 回答1: This is possible using the standard android-storage, where all the user's files are stored too: All you need to do is to access the same file and the same path in both applications, so e.g.: String fileName = Environment