FAQ Database Discussion Community


can people read the content of an online php file? [closed]

php,file-permissions
My php file online has permission settings 444 - ('readable' for everyone) When I open the file in Firefox, it correctly only shows the output of the file (meaning things that are echoed or printed) I want people to NOT EVER see the inside of the php file because it...

PHP Upload Permissions Error

php,angularjs,file-permissions
I'm setting up a file browser on a php and angular.js server,and the function call to move_uploaded_file fails with a permissions denied error, however I am just SO certain that my permissions are correct, even dangerously open-ended. Here's the upload.php file: http://pastebin.com/uXkeZ4nw don't worry about that stuff at the bottom,...

upload a file with the same name

php,file,file-upload,file-permissions
I want to upload a file from my android application. The first time it happens successfully but the second time if I want to replace the file it won't do anything. <?php $file_path = "usuario/"; $file_path = $file_path . basename( $_FILES['uploaded_imagen']['name']); if(file_exists($file_path)) { unlink($file_path); } if(move_uploaded_file($_FILES['uploaded_imagen']['tmp_name'], $file_path)) { echo "success1";...

Java SE 6 and Java SE 8 JRE behave differently on Windows 7 (files permissions)

java,windows,java-8,file-permissions,windows-7-x64
I have a command line Java application which reads and writes files on Windows 7 x64 platform. Currently application runs with shipped IBM Java SE 6. Structure as follows: APP_ROOT some_folder jre bin lib myjarfile.jar appl_start.bat Now, I replaced the jre folder with unzipped JRE 8 package. And the application...

CHMOD 777 on Directories for Database to be Able to Write (Help Me Understand)

mysql,wordpress,file-permissions,user-permissions,centos7
I have a limited understanding of MySQL's interaction with my CentOS 7 server and need some help. Basically, I have a WordPress installation and I need to set the uploads directory and all directories within to CHMOD 777 to upload images via the backend. CHMOD 775 doensn't work though. This...

Why are my OS X files executable; should I change that?

osx,security,file-permissions
Rummaging around some directories using Terminal on my OS X machine, I've discovered that many files (mostly old .doc, .xls, .jpg and even some .url files) have permissions -rwx------+ rather than the more common (and expected) -rw-r--r--+ or [email protected] I'm unclear why this should be the case. Most of the...

Jenkins Linux file access or group issue

linux,jenkins,file-permissions,permission-denied,master-slave
I'm facing a strange file access issue. Linux system is RedHat 5.5 On this machine, when I log in as the given user: deploy_user, I can see that I have valid access to /path/to/the/folder/subfolder/file.txt ls -l /path/to/the/folder shows (this means upto this path I can see contents): 13:50:53 drwxr-x--- 2...

Ansible - Mode 755 for directories and 644 for files recursively

file-permissions,ansible
I'd like to allow anyone to list and read all files in my directory tree, but I don't want to make the files executable : dir \subdir1 file1 \subdir2 file2 ... \subdirX fileX The following task makes my directories and files readable, but it makes all the files executable as...

cygwin “Permission denied”

c,cygwin,file-permissions
Trying to launch a file ./cu/cu-check-regressions --help Get this: -bash: ./cu/cu-check-regressions: /usr/bin/python: bad interpreter: Permission denied Already changed permission in properties>security my account has full control over the folder. Tried running cygwin as Administrator did not work as well. Googled the issue for the past two hours....

FileZilla uploads files with 000 permissions [closed]

file-permissions,uploading,filezilla
I've been having problems with FileZilla a few days now. I have a server running on CentOS with Apache etc. And am uploading Wordpress to a new domain on my server. I've done this a million times before and am currently running 3 other properly working Wordpress sites on my...

File.canWrite and Files.isWritable not giving correct value on Linux

java,file,file-permissions
I have this test java program import java.io.File; import java.nio.file.FileSystems; import java.nio.file.Files; public class TestFileReadOnly { public static void main(String[] args) { String filePath = args[0]; File f = new File(filePath); System.out.println("File.canWrite() for file: " + filePath + ", is: " + f.canWrite()); System.out.println("Files.isWritable() for file: " + filePath +...

File permissions for a JavaScript file

javascript,file-permissions,chmod
I have the following directory structure: var/www/example.com/public_html/index.html var/www/example.com/public_html/images/example.jpg var/www/example.com/public_html/javascript/example.js I ran the following file and directory permissions command: chmod -R 755 var/www/example.com/public_html So, all of the above files have 755 permissions, i.e. -rwxr-xr-x (I've confirmed this via FileZilla). From my browser I can navigate to index.html and to example.jpg. However,...

Get permission to work with files on my Amazon EC2 Ubuntu server using FTP-WinSCP

amazon-ec2,ftp,file-permissions,winscp,ubuntu-server
I have an Ubuntu server on Amazon, I installed everything for working with it (php, mysql, phpmyadmin, apache..), The problem is that I cant move around or edit files using the FTP. I get the error message: Permission denied. Error code: 3 Error message from server: Permission denied from my...

How to freeze a folder in linux?

linux,permissions,file-permissions,freeze
I wanna to freeze a folder in red hat so nobody (even root) can not add file into the folder or change files that exist in the folder already, i tried to make folder read only but this does not work and root user can add files normally as before,...

Linux permissions - user vs group permission

linux,unix,permissions,file-permissions,user-permissions
I know that the permissions listing are for user , then the group and the third one is for other users. my example : _rwxr--r-- tooth face file1.txt _rwxr--r-- eye face file2.txt _rwxr--r-- leg face file3.txt groups included tooth : face head eye : face head leg : body Now,...

Get permission level of a folder

c#,file-permissions
I have an EventHandler that checks permission level. private void button1_Click(object sender, EventArgs e) { int id = 1; XMLPermSheet.CreateXML(); string directory = textBox1.Text; DirectoryInfo di = new DirectoryInfo(directory); DirectoryInfo[] sdi = di.GetDirectories(); foreach (DirectoryInfo tdi in sdi) { if (!tdi.ToString().EndsWith("System Volume Information") && !tdi.ToString().Contains("$RECYCLE.BIN")) { XMLPermSheet.AddPath(tdi.ToString(), id); DirectorySecurity ds...

Symfony 2 - Unzip a ZIP file & upload folder permissions

php,osx,symfony2,permissions,file-permissions
I have a Symfony 2 project with an upload folder (uploads works well). I'm creating a ZIP file after the upload which I put inside the same folder as the uploaded file (so the archive is created from the PHP script). But i cannot extract the archive afterwards under MAC...

What do all those permissions mean?

file-permissions
Where can I find out the meaning?...

Docker Copy and change owner

docker,file-permissions,dockerfile
Given the following Dockerfile FROM ubuntu RUN groupadd mygroup RUN useradd -ms /bin/bash -G mygroup john MKDIR /data COPY test/ /data/test data RUN chown -R john:mygroup /data CMD /bin/bash In my test directory, which is copied I have set the file permissions to 770. If I do a su john...

Issue with Wordpress Folders on Google Compute Engine

wordpress,file-permissions,google-compute-engine
I'm migrating a WordPress site to Google Cloud using Click To Deploy. All as gone well so far except a folder permissions problem when migrated the current sites wp-content folder. Steps I took to make this work... I set up a new WordPress install by using Click To Deploy and...

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

security,find,file-permissions
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,...

gammu-smsd RunOnReceive script results exit status 2

linux,bash,sms,file-permissions,gammu
I want to forward an SMS using gammu-smsd RunOnReceive. That is the script I want to run (/var/spool/gammu/forward.sh) and it goes perfectly if I run it from a sudoer or using sudo -u gammu -g gammu /var/spool/gammu/forward.sh #!/bin/bash SMS_MESSAGES=1 for i in `seq $SMS_MESSAGES` do number="SMS_${i}_NUMBER" text="SMS_${i}_TEXT" eval "gammu-smsd-inject TEXT...

Deployment with Rake Causing Image Permission Errors (600)

ruby,rake,web-deployment,file-permissions
I'm deploying my website to my server with Rake for the first time and I've run into a slight issue. RAKEFILE desc 'Deploying the website...' task :deploy do puts 'Deploying to server.com' user = 'user' server = 'server.com' path = 'server.com/html' sh "rsync -rtzh --delete _site/ #{user}@#{server}:#{path}" puts 'Fin!' end...

Android : change permission of system files

android,file-permissions
My phone is rooted and i wrote code in my app to change file permission of system file which is located at /sys/class/leds/lcd-backlight/brightness Runtime.getRuntime().exec("su"); Runtime.getRuntime().exec("chmod 777 /sys/class/leds/lcd-backlight/brightness"); but this code can't change the file permission of the specified file and i won't got any kind of error or exception...

Why can't I open/write from a serial port on Android?

android,serial-port,file-permissions,android-4.4-kitkat,tty
I have written an Android app which runs on a custom kernel on Android 4.4 Kitkat device, which uses the Android Serial Port API (https://code.google.com/p/android-serialport-api/) in order to open the serial port "/dev/ttyACM0" which is the port associated with my serial device. The port has the proper "666" permissions (crw-rw-rw),...

How do I make all files executable that have the file extension .cgi?

ubuntu,file-permissions
My server downloads its files from git hub to make sure they are up to date and make it easier for me to edit the files. I have set up a cron job that will update the files every few minutes. However I am having a problem as the CGI...

Permissions for subfolders Owncloud

linux,file,permissions,file-permissions,owncloud
I want to give permissions for subfolders in Owncloud. Example: a user can edit and read all the files in a synchronized folder except some specific subfolders. Im working with desktop client and web interface. Version: OwnCloud 8.0.3 (stable)...

coldfusion permissions on linux for file operations ( cffile, cfdirectory )

linux,coldfusion,permissions,file-permissions,user-permissions
I have a simple little admin system that works fine on IIS, but I'm having problems moving it over to Linux. The system can create, rename and delete directories, create and upload/save files, and edit, rename or delete those files. On Linux I keep running into permission problems. The hosting...

Why are newly created files inheriting from 'Parent Object' instead of the parent folder on Windows Server 2012?

windows,inheritance,file-permissions,windows-server-2012,windows-server
I have posted this question on Drupal Answers, but I don't know if it is a Drupal problem or a Windows problem, so I am posting here in case it is windows. The Drupal Answers question has screen grabs which might explain this clearer- http://drupal.stackexchange.com/questions/149671/incorrect-file-permissions-when-images-are-uploaded-in-the-ckeditor-wysiwyg-usin. I'm using Windows Server 2012....

IIS cannot write file if called from remote, only from the server

c#,.net,iis,file-permissions
I am running a web api on a IIS on Windows Server 2012 R2. The application has a controller, that on a get request will write to a file on a network share. If I access the site from a browser on the server it works fine, however if I...

File permissions, root bash script, edit by user

bash,shell,root,file-permissions
I have a script that needs to be ran as root. In this script I create directories and files. The files and directories cannot be modified by the user who ran the script (unless there root of course). I have tried several solutions found here and other sites, first I...

PHP upload not working, maybe permission issues

php,file-permissions
I need to make an upload page in my site, I'm using an altervista trial server. I used the tutorial http://www.w3schools.com/php/php_file_upload.asp but the upload doesn't work. maybe, as I read is a permission issue, but I don't have the slightest idea on how to change the permissions of my folders....