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
0
votes
2 answers

Cant change owner of new file

I'm using PHP to retrieve some Base64 data, decode it and write it to a file, my code works fine. However, the owner is apache and the permissions are very low, so even if I FTP into the area where it's uploaded, i cannot download the file. However…
dotty
  • 40,405
  • 66
  • 150
  • 195
0
votes
2 answers

How to check if a file is owned by the current user in Java?

I want to show a warning if a file is read that is not owned by the user that started the JVM. In my application, this file can make the program write arbitrary files. So I want to reduce the risk of a privilege escalation attack, if an admin…
Basic7x7
  • 31
  • 5
0
votes
0 answers

file_put_contents permission denied due to file ownership issue

I am using PHP file_put_contents to generate PDF files inside a directory named invoices. This was working fine for a long time but stopped working with no changes to the code generating the invoices (I have asked the hosting providers about any…
Ryan
  • 152
  • 1
  • 13
0
votes
1 answer

Git - What should I do about directory ownership change?

I recently re-installed Windows on my computer. When I try to use Git in the workspaces on my other drive - which was left unchanged between Windows installations - it gives a warning due to a mismatch in user ID's: max@DESKTOP-EA1LBGP MINGW64…
Max Jacob
  • 701
  • 1
  • 9
  • 20
0
votes
1 answer

How to update chowned flutter on linux installed in /opt/ with yay from aur?

I installed flutter on linux into /opt/ folder from aur by yay. I found that I should change ownership from root to another user. Found some steps which suggested changing to exclusive flutter group so I chowned it and forgot about that. Maybe it…
Dalton
  • 347
  • 3
  • 15
0
votes
1 answer

Take ownership & Delete Folder Errors

So i'm trying to delete a few remote folders but am running into permission issues. I've tried: Get-ChildItem \\$Comp\c$\eQube-Tools -Force | Remove-Item -Recurse Get-ChildItem \\$Comp\c$\Gecko -Force | Remove-Item -Recurse Remove-Item…
0
votes
1 answer

MySQL: Ownership of mysql directory changes to 'mysql' from 'service_account' on linux server reboot

I'm using MySQL distribution 10.2.39-MariaDB, for Linux (x86_64). It runs fine when we initially start it up and manually configure it to correct ownership and startup. But whenever we reboot the Linux server, the ownership of '/var/lib/mysql'…
0
votes
0 answers

Error executing "takeown" command from "runas" in batch file

I wrote a little program to automate: Taking own of a file/folder for a specified User. Get (for the same User) FULL CONTROL of the file/folder. Now, it is well know that takeown.exe wants cmd.exe to be run as Administrator rights. So, to do in a…
mEm
  • 353
  • 3
  • 12
0
votes
0 answers

Docker mounted volume of Influxdb is owned by root

I am running Influxdb image with mounted volume like this: docker run -v $(pwd)/data:/var/lib/influxdb influxdb This will create data/ directory owned by root: $ ls -ld data/ drwxr-xr-x 5 root root 4096 Jun 10 10:47 data/ I can not find out how to…
Michal Špondr
  • 1,337
  • 2
  • 21
  • 44
0
votes
1 answer

Grant acces to dictionary only via my script

I have few directories with files on debian 9 system. I want to disable privilege to read these directories for everyone than owner, but I want to let some users list files in this directories only by my own script in bash. I change privileges to…
Delfin17
  • 3
  • 2
0
votes
0 answers

A script to change a directory's permissions and owner immediately after it is created?

I have the ability to create directories, but I have a problem where... I cannot continue to access directories that might require a second or third operation after their initial creation; so, I want to create a script with admin access that can…
Wolfpack'08
  • 3,982
  • 11
  • 46
  • 78
0
votes
0 answers

How to find the owner of a file in Windows?

Same question as here, but for Windows. This answer works nicely in Linux: from os import stat from pwd import getpwuid def find_owner(filename): return getpwuid(stat(filename).st_uid).pw_name The module pwd doesn't seem to be available in…
Raf
  • 1,628
  • 3
  • 21
  • 40
0
votes
2 answers

google apps script: file.setOwner() Not Transferring Ownership in Google Drive

I am trying to transfer ownership of all my .pdf files to another account with more space. I am testing the code with a single folder in my drive. function transfer() { var user = Session.getActiveUser(); var folder =…
0
votes
1 answer

Reading file and directory owner using PHP on the Windows

I have an intranet project based on the PHP and xampp server on the Windows. That intranet project have database with table where I store scanned disc drive informations of files and folders. I using simple windows command dir "$directory_path" /Q…
Ivijan Stefan Stipić
  • 6,249
  • 6
  • 45
  • 78
0
votes
3 answers

Keeping fileowner and permissions after copying file in C

here is my problem: In C, I create the copy of a file (with some changes) This is done trivially via fopen(), getchar and putchar. Copying the file is fine and the outputfile itself is what I want it to be. My problem is: I assume that I will use…
Chris
  • 2,030
  • 1
  • 16
  • 22