Questions tagged [file-ownership]

A file system attribute used mainly for access control to file resources.

Many operating systems utilize the concept of file ownership to identify a specific system user as the owner of a file or directory. Where classes of users may be granted varying privileges for access to a file or directory (typically read, write, execute, or variations of those), the owner will have distinct permissions.

Useful links:

120 questions
1
vote
0 answers

In python 3 running on Windows, how do I get the owner of a file

Note: I'm working on Python 3.x on Windows. I've been working on this for quite a while, and I've found the solution on UNIX systems to be pretty easy. os.stat("filename").st_uid On Windows this just returns 0 I've found a solution that works…
Pyrometheous
  • 65
  • 2
  • 14
1
vote
2 answers

PHP Creating folder with the owner as 99

I have a script (run as a cron) that creates a new folder called images on a server and moves images from the root folder to this new folder. Later another function will create thumbnails from these images and places these into another new folder…
Ruben
  • 189
  • 1
  • 3
  • 9
1
vote
1 answer

Confused: File ownership changed with setuid special permission flag

File Permission with setuid enabled(rws). File Owner: vaisakh vaisakh@computer:~/me$ ls -l total 4 -rwsr-xr-x 1 vaisakh vaisakh 60 May 3 17:05 vaisakh.sh Switch to an another user var23 vaisakh@computer:~/me$ su var23 Password: Rechecking the…
Vaisakh Rajagopal
  • 1,189
  • 1
  • 14
  • 23
1
vote
1 answer

How to replace binary file during rpm upgrade without changing permissions

I need to replace the existing binary during rpm upgrade but I do not want to change the permission/ownership which is set already. In my case, after the binary installation (not upgrade), ownership/permissions are set properly by rpm. But after the…
RunSingh
  • 69
  • 8
1
vote
3 answers

Can't get File Owner using Google Drive API

Trying to find the owner of a file by getting the permissions for the file, looping through them, and retrieving the user information (specifically the email address) of the permission with the role of "owner". PermissionList filePermissions =…
1
vote
3 answers

Mercurial: How do I find the creator of a file?

ATM I do it this way which is far slow and incorrect: for i in `find -type f`; do echo $i`LANG=C hg log -v $i | grep user | tail -1 | awk '{print " "; print $2}'`; done When someone has moved a file to a new name, yes he is the creator of that…
math
  • 8,514
  • 10
  • 53
  • 61
1
vote
2 answers

Making Git use the correct owner group names when doing a pull

I have setup Git on our production and staging server and it's working well, however upon doing a git pull on the staging server it seemed to set the group owner name to the user I was logged into under SSH, which was root. Is there anyway to get it…
Brett
  • 19,449
  • 54
  • 157
  • 290
1
vote
1 answer

Check that file is writable by current user in POSIX shell

Current user is $USER. Previously I use: if [ -e "$f" ] && [ `stat -c %U "$f"` != $USER ] \ || [ -e "${f%/*}" ] && [ `stat -c %U "${f%/*}"` != $USER ]; then to detect if file is owned by user (or dir if file is not yet exist). But file can be…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
1
vote
3 answers

How to correctly configure ownerships / rights for a Symfony2 website on Debian

I want to manage a Claroline website, (based on Symfony 2). So for my site mysymfony.com installed for user "theclient" 1 - 0 I added theclient to the www-data group : adduser theclient www-data 1 – 1 - modified /etc/hosts : 127.0.0.1 …
Overdose
  • 585
  • 7
  • 30
1
vote
1 answer

File owner of the file created by windows service

I am developing a java application which entails that the owner of the files that are created by my application is different other than the one who will be using the application. I am contemplating installing this application as a windows service.…
1
vote
3 answers

batch: get the name of the owner of a folder

the only command that i know to get the owner of a folder in a batch script is: dir %foldername% /q this has two problems: it shows in a list all foldername's content, so i've to read only the first row (which contains < DIR > and ".") or you've…
CSG
  • 247
  • 5
  • 14
1
vote
1 answer

How to get owners information for sas file in Windows SAS?

Is there a way to find the information about owner of sas file in Windows SAS? I tried the following code But it doesnt give any information about the owner of code. data info; length infoname infoval $300; drop rc fid infonum i close; …
1
vote
1 answer

Missing the File's Owner item

i try to understand how i can show my textfield over the keyboard and do an tutorial. this is an older Version than my SDK 5.1. Now I try to do this : "In Interface Builder, right-click on each Text Field view and connect the delegate outlet to the…
Johannes Knust
  • 891
  • 1
  • 11
  • 18
0
votes
1 answer

make: automate changing file permissions with Makefile

I have a directory structure with projects, and I need to make sure that when I copy new files, the directory structure has the correct permissions (basically, as if created with umask 022) and ownership: root:users 755 for directories 644 for…
400 the Cat
  • 266
  • 3
  • 23
0
votes
0 answers

AccessDeniedException with Files.setOwner(p, user)

I working with a web project that will be deployed with root, but the files created must be under another owner. I have tried this: String owner = "currentUser"; Path p = Files.createFile(Paths.get("myFile.log")); if (owner != null &&…
Janny
  • 33
  • 6