file-permissions

How to make an assets folder private in rails?

I'm using Paperclip for letting users upload photos to my app. Then, I'm saving the photos in /public/photos. Now, I want the photos being accessible just for some users. How can I set this permission system up? ...

Prevent 'the world' from accessing members PDFs in an Umbraco CMS

Hi All I am new to Umbraco and have inherited an existing site 3-4 years old. One of our users has just come to me and asked why her members only PDFs are freely available if Googled by name, but their containing folder in Umbraco is not - ie she has to log in to get to the folder. Within the Umbraco Admin system I can see how to set p...

Are there any permission issues if I try and write to AllUsersApplicationData

I have an encrypted connection file I want to make accessible to a couple of different applications, and I want to make it available to all users of the machine my apps are installed on. I'm thinking of writing it to my "Company" root folder within the My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData path, by which I me...

Get a report of all shares and user permissions (NTFS and share) on a Server 2003

We want to move all of our file shares and their permissions to an external NAS. We purchased the Synology RS810 and are looking to start moving everything. We want to know all the permissions and shares so we can set them on the target device. We would love to copy the files with permissions but I don't think it will work because the...

File permission issue with Mac/Windows when using git

I ran the following code to pull files from windows git repository. git pull /Volumes/sucho/Desktop/git/setup And I connect the Windows directory as follows. tell application "Finder" mount volume "cifs://WINDOWS/c$/Users/sucho" as user name "USR" with password "PW" end tell It works well, but the problem is the pulled files fr...

determine file permissions for the current user

I am looking for a way to determine file permissions for the current user (i.e. the process's UID) on POSIX-compliant systems. I don't want to try opening the file - that could get messy with directories and all kinds of special files. I am compiling a directory listing of a specified directory, and for each file, reporting a bunch of t...

Checking for file existence in C++

Currently I use something like: #include <sys/stat.h> #include "My_Class.h" void My_Class::my_function(void) { std::ofstream my_file; struct stat file_info; if ( filename_str.compare("")!=0 && stat(filename_str.c_str(),&file_info) == 0 ) { my_file.open(filename_str.data(),std::ios::trunc); //do stuff my_...

Windows Service can't access network share

I have a windows service running on my local machine. It's configured to run under NT AUTHORITY\NETWORK SERVICE. The program access a network shared drive on a computer in the same subnet. That shared directory has Everyone set to Full control. I'm getting False on File.Exists, but the file exists. I'm certain this is a permission issu...

Linux (Ubuntu 9.04) permissions - how do I remove rws?

I have a directory that has rwxrwsr-x as its permissions and I need to set group to rwx. How can I do this on the command-line? I have root access. ...

Check if we have write access to a folder? Delphi

Possible Duplicate: How can I use Delphi to test if a Directory is writeable? My program will download an update for the user if they request it. The user has to specify the location to save the installer. They might pick a directory which they don't have access to save something to. In this case the download starts (downlo...

ftp mkdir permission

Hi, I can create a folder on a pc that I connect to via ftp. When I create a folder using mkdir and then to move some files using "rename" I get access is denied. Is there a way around this? I'm doing this programatically and creating a backup folder for each day. I created a folder called archive via FTP and gave the FTP user full...

php file upload permissions ?

Hi, I have developed a download/upload manager script that will be used by many people. When i upload a file via POST method it is stored in a folder called files , the files folder is within another folder called download-manager. Now it seems when i upload via the POST method 0666 CHMOD works when i want to rename, delete the file b...

Can a Windows service running under Local System create new files on the computer it is running on?

I have created a Windows Service that has a function that creates a new file. It is running under "Local System account" with "Allow service to interact with desktop" set to true. When running under this account can files be created locally? I can't debug this to get the exact error as it is running in a Lab Manager environment that h...

file permissions owner, group, public clarification (web)

Could someone please explain owner/group/public permissions on files and directories in a web environment. My current understanding is that "Owner" is the person who created the file. Group, presumably are permissions granted to any user in Group 'Foo', and Public is, well, everyone. What I don't quite get is how this translates to a ...

Resetting a File's Security Permissions in ASP.NET

Hi, I've got a routine that tries to import files from an import directory, spitting them out to an Error directory if the import fails. The Error directory is shared and users have access permissions to delete files in there, so they can try to fix the problems and then move the files off to the import directory again. I use File.Move...

Structuring a central Git remote to serve production Apache sites

I've been referring to http://toroid.org/ams/git-website-howto as a starting point for a production web server running on a managed VPS. The VPS runs cPanel and WHM, and it will eventually host multiple client websites, each with its own cPanel account (thus, each with its own Linux user and home directory from which sites are served). E...

ASP.NET - "Unknown user name or password" when trying to copy file to remote share

I have an ASP.NET application that's trying to copy a file to a remote share that's on a server on another domain ("REMOTEDOMAIN"): File.Copy(@"c:\Test.txt", @"\\REMOTEMACHINE\Share"); When we get to the File.Copy method, I'm getting "Login failure: Unknown user name or password" when trying to connect to the share through the local I...

How do I recursively set read-only permission using Perl?

I would like $dir and everything underneath it to be read only. How can I set this using Perl? ...

What (except needing to be root) could cause a permissions error when using PHPs shell_exec?

I have a bash script which runs without needing to be root. But when I run it via shell_exec() (or system(), or exec()) like this: return system("/home/tom/rrd/rrdtool-drawgraph.sh $interval $multiples - debug 2>&1;"); I get the following message: sh: /home/tom/rrd/rrdtool-drawgraph.sh: Permission denied (Strangely, the message...

Setting Commit and Checkout Privileges for a Git Repository

We are having a local repository which is accessible to a large number of people. We have to set up a Git repository there such that only certain users have checkout as well as commit privileges. How can we do that. P.S. : This is a part of our homework assignment in which we have to develop a game and update it using a Git repository. ...