ownership

“Operation not permitted” from docker container logged as root

会有一股神秘感。 提交于 2020-06-14 20:15:57
问题 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 docker-compose which build a nginx container. I have a folder src with a PHP file like this "src/index.php". I build the container and start it. Then i go to /app/www/mysrc (shared volume) and tape "ls -la" to check if the index.php is OK and i get :

“Operation not permitted” from docker container logged as root

若如初见. 提交于 2020-06-14 20:13:08
问题 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 docker-compose which build a nginx container. I have a folder src with a PHP file like this "src/index.php". I build the container and start it. Then i go to /app/www/mysrc (shared volume) and tape "ls -la" to check if the index.php is OK and i get :

“Operation not permitted” from docker container logged as root

五迷三道 提交于 2020-06-14 20:11:07
问题 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 docker-compose which build a nginx container. I have a folder src with a PHP file like this "src/index.php". I build the container and start it. Then i go to /app/www/mysrc (shared volume) and tape "ls -la" to check if the index.php is OK and i get :

“Operation not permitted” from docker container logged as root

帅比萌擦擦* 提交于 2020-06-14 20:08:41
问题 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 docker-compose which build a nginx container. I have a folder src with a PHP file like this "src/index.php". I build the container and start it. Then i go to /app/www/mysrc (shared volume) and tape "ls -la" to check if the index.php is OK and i get :

Used chown for /var/lib/mysql to change owner from root, now getting Error 1049 (42000) in mysql

老子叫甜甜 提交于 2020-05-13 03:38:08
问题 With Ubuntu, I previously created a mysql database using the following code in the terminal: $ my sql -u root -p Then within mysql: CREATE DATABASE securities_master; I was trying to use file explorer to view the contents related to this database. But because I did not have permissions to open the folder /var/lib/mysql I wanted to change the permissions on this folder. I did some searching on stackoverflow, and without fully understanding what I was doing, I used something like the following

Taking directory ownership on Windows with Python results in “Access denied” error

强颜欢笑 提交于 2020-04-11 08:22:20
问题 I'm trying to take ownership of a directory with the following code: sd = win32security.SECURITY_DESCRIPTOR() sd.SetSecurityDescriptorOwner(curUser, False) win32security.SetFileSecurity("C:/ProgramData/Test", win32security.OWNER_SECURITY_INFORMATION, sd) The SetFileSecurity call fails with an "Access denied" error. The access rights for the current user have been removed from this directory. In Explorer I can see it, but when I try to open it, I first have to take ownership as an

Type inference and borrowing vs ownership transfer

我只是一个虾纸丫 提交于 2020-02-02 02:14:06
问题 I am learning Rust and I've run into some confusing behaviour. The following code compiles fine and works as expected ( edit : added code other than test function, previously omitted): struct Container<'a> { contents : &'a mut i32, } fn main() { let mut one = Container { contents: &mut 5 }; test(&mut one); println!("Contents: {}",one.contents); } fn test<'a>(mut x : &'a mut Container) { *x.contents += 1; let y = x; *y.contents += 1; x = y; println!("{:?}",*x.contents) } Now in the statement

Cannot assign to `self.x` because it is borrowed

喜夏-厌秋 提交于 2020-01-24 23:58:07
问题 I have 2 functions: // A simple struct struct S { w: u8, h: u8, x: Vec<u8>, y: Vec<u8>, } // Implementation of the struct S impl S { // Seems to work fn new(_w: u8, _h: u8, _x: &Vec<u8>, _y: &Vec<u8>) -> S { S { w: _w, h: _h, x: _x.clone(), y: _y.clone(), } } fn calc(&mut self) { let mut min_x = self.x.iter().min().unwrap(); let mut max_x = self.x.iter().max().unwrap(); let mut min_y = self.y.iter().min().unwrap(); let mut max_y = self.y.iter().max().unwrap(); // Here's the line that gives

In Rust, what exactly are mutable and immutable borrows?

久未见 提交于 2020-01-24 13:53:06
问题 I'm stuck with the Rust concepts of borrowing and mutable : #[derive(Debug)] struct Rectangle { height: u32, width: u32, } fn mut_area(rect_mut: &mut Rectangle) -> u32 { rect_mut.width /= 2; rect_mut.height * rect_mut.width } fn mut_string(s: &mut String) -> &str { s.push_str("!"); let len = s.len(); &s[0..len / 2] } fn main() { let mut rect = Rectangle { height: 50, width: 40, }; println!("original rect: {:?}", rect); let a = mut_area(&mut rect); println!("area of rect: {}", a); println!(

In Rust, what exactly are mutable and immutable borrows?

烈酒焚心 提交于 2020-01-24 13:52:00
问题 I'm stuck with the Rust concepts of borrowing and mutable : #[derive(Debug)] struct Rectangle { height: u32, width: u32, } fn mut_area(rect_mut: &mut Rectangle) -> u32 { rect_mut.width /= 2; rect_mut.height * rect_mut.width } fn mut_string(s: &mut String) -> &str { s.push_str("!"); let len = s.len(); &s[0..len / 2] } fn main() { let mut rect = Rectangle { height: 50, width: 40, }; println!("original rect: {:?}", rect); let a = mut_area(&mut rect); println!("area of rect: {}", a); println!(