You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chown: changing ownership of 'elasticsearch-7.9.2/NOTICE.txt': Operation not permitted
chown: changing ownership of 'elasticsearch-7.9.2/config/users_roles': Operation not permitted
chown: changing ownership of 'elasticsearch-7.9.2/config/log4j2.properties': Operation not permitted
It propmts a box for authenticating a password. After input the password,it allows it to go through the step.
!sudo chown -R daemon:daemon elasticsearch-7.9.2
It reminds me of inputing password. However, there is no a prompted box for filling the password again.
2. Try getpass function
The following command also is not useful.
import getpass
import os
password = getpass.getpass()
command = "sudo -S apt-get update" #can be any command but don't forget -S as it enables input from stdin
os.system('echo %s | %s' % (password, command))
Information
The problem arises in chapter:
Describe the bug
[chown Operation not permitted]
chown: changing ownership of 'elasticsearch-7.9.2/NOTICE.txt': Operation not permitted
chown: changing ownership of 'elasticsearch-7.9.2/config/users_roles': Operation not permitted
chown: changing ownership of 'elasticsearch-7.9.2/config/log4j2.properties': Operation not permitted
File ~/miniconda3/envs/torch/lib/python3.10/subprocess.py:1864, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, gid, gids, uid, umask, start_new_session)
1862 err_msg = os.strerror(errno_num)
1863 raise child_exception_type(errno_num, err_msg, err_filename)
-> 1864 raise child_exception_type(err_msg)
To Reproduce
Steps to reproduce the behavior:
stdout=PIPE, stderr=STDOUT, preexec_fn=lambda: os.setuid(1))
Expected behavior
The text was updated successfully, but these errors were encountered: