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

What user should own /usr/local/mysql on Mac?

What should the file owner & group be of /usr/local/mysql and all contained files & directories? MySQL was working fine, but after I did sudo chown -R $USER:staff /usr/local to install Homebrew, MySQL couldn't automatically start on startup, and on…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
44
votes
2 answers

Docker creates files as root in mounted volume

I'm using Docker (1.3.1) to build RPMs inside a container: docker run -v /home/matt/build:/build build-rpm /build/build-pkg.sh This works fine (my user is in the docker group, so I don't need to sudo) and drops a completed .rpm file in the current…
Matt R
  • 9,892
  • 10
  • 50
  • 83
25
votes
1 answer

"Operation not permitted" from docker container logged as root

I need your help to understand my problem. I updated my macintosh with Catalina last week, then i updated docker for mac. Since those updates, i have ownership issues on shared volumes. I can reproduce with a small example. I just create a small…
hugoDuf
  • 275
  • 1
  • 3
  • 7
16
votes
1 answer

Find out File Owner/Creator in C#

Possible Duplicate: Getting / setting file owner in C# I searched the Internet but didn't found out how to get the File Creator/Owner In the FileInfo Class are only other Attributes like lastAccessTime, Size, but not the Owner/Creator. Does…
Alex
  • 207
  • 1
  • 2
  • 11
15
votes
2 answers

How to get file's owner name in Linux using C++?

How can I get get the owner name and group name of a file on a Linux filesystem using C++? The stat() call only gives me owner ID and group ID but not the actual name. -rw-r--r--. 1 john devl 3052 Sep 6 18:10 blah.txt How can I get 'john' and…
Dula
  • 1,404
  • 1
  • 14
  • 29
15
votes
4 answers

Why docker-compose creates directories/files with user:group 999:999?

I used docker-compose up with the following docker-compose.yml version: '3.5' services: mysql-server: image: mysql:5.7 environment: - MYSQL_ROOT_PASSWORD=root_pwd volumes: - ./var/lib/mysql:/var/lib/mysql:rw The directory…
Marinos An
  • 9,481
  • 6
  • 63
  • 96
12
votes
2 answers

Cocoa - How to connect view's delegate to file's owner in storyboard mode?

When I use an .xib, I connect a view's delegate to the File's Owner via interface builder, then go into the view controller's .h file and set it as the delegate to complete the connection via . However in storyboard mode, there is no file's owner…
Adam Eisfeld
  • 1,424
  • 2
  • 13
  • 25
10
votes
3 answers

Prevent git from overwriting file owner upon git pull

I've seen a handful of similar questions on here, but none of the solutions given seem to be working... wondering if they're outdated, or this case is somehow different...so I wanted to open up a new thread to talk about it. I've run into a…
Jillian Hoenig
  • 137
  • 1
  • 6
  • 28
10
votes
2 answers

How can I take ownership of multiple files in Windows?

Setting it file by file works, but is slow. Selecting all of them at once doesn't have this configuration. And the files can't inherit the security properties of the folder because they don't have my ownership.
Marco
  • 129
  • 1
  • 1
  • 9
7
votes
1 answer

docker-compose creates file owned by root

I followed all steps described here: https://docs.docker.com/compose/django/ Everything runs, but the problem is that created files are owned by root. I have no idea how to change it. I'm able to run docker run hello-world - no sudo required. The…
tunarob
  • 2,768
  • 4
  • 31
  • 48
5
votes
2 answers

How do you permit PHP to write to a file without compromising server security

I am often confronted with negative comments whenever I want to have a PHP script write output to a file on the server. I use the fopen(), fwrite() and fclose() functions. The only way I know how to make this happen is to either set the permissions…
H. Ferrence
  • 7,906
  • 31
  • 98
  • 161
5
votes
1 answer

Set file owner:group in Linux using Qt/C++

I need to change the owner and group of a file under Linux using Qt 5.7 /C++. I found the QFileInfo::ownerID and QFileInfo::groupID getters, but there appear to be no setters for these values. I need the Qt equivalent of chown. Is there a way to…
TSG
  • 4,242
  • 9
  • 61
  • 121
4
votes
3 answers

what is the difference between suid and other permission (world permission)?

In simple words users will get file owner’s permissions as well as owner UID and GID when executing a file/program.It will not change the file's owner. If you imposed in a program: rwsrwxr-- or rwxr--rwx What is the difference if I set the SUID…
bilz
  • 41
  • 1
4
votes
0 answers

OS X: make pkg, post install script running as root

I'm using Packages to build PKG installer. Its goal quite simple: deliver my app to /Applications folder and launch it. Packages.app is doing its job almost well except one thing. When it launches post install script (simple script that launches…
DeepThought
  • 228
  • 1
  • 3
  • 10
4
votes
4 answers

Drupal - The directory sites/default/files exists but is not writable and could not be made writable

When I try to add "Public file system path" and "Private file system path" in Administration > Configuration > Media > File System in my drupal site, I get "The directory sites/default/files exists but is not writable and could not be made writable"…
Aasim Hussain Khan
  • 1,137
  • 3
  • 15
  • 33
1
2 3 4 5 6 7 8