You are not logged in.

#1 2022-09-14 13:14:15

thommen
Member
From: Poland
Registered: 2017-12-30
Posts: 239

[SOLVED] touch - the problem with rights

I assigned the directory all rights

ls -l
drwxrwxrwx 2 pit users 4096 09-14 15:06 q

I changed the owner

sudo chown http: -R q

And I have

ls -l
drwxrwxrwx 2 http http 4096 09-14 15:06 q

Why can't I execute (access denied) the time change if I have all the rights?

touch -d "$(date -R)" q

Last edited by thommen (2022-09-15 08:38:05)

Offline

#2 2022-09-14 14:33:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,484

Re: [SOLVED] touch - the problem with rights

sudo -u http touch -d "$(date -R)" q

… (access denied) …

No, you get an EPERM and

touch: setting times of 'q': Operation not permitted

https://man.archlinux.org/man/core/man- … p.en#EPERM

EPERM
The times argument is not a null pointer and the effective user ID of the calling process does not match the owner of the file and the calling process does not have appropriate privileges.

Reminder: don't paraphrase.
https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

Board footer

Powered by FluxBB