Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

create a directory on /etc/samba/ via python

$
0
0

I am trying to create a directory on /etc/samba/ but I have the error:PermissionError: [Errno 13] Permission denied: '/etc/samba/credentials'

My function is this:

samba_credentials_path = "/etc/samba/credentials"# Funcion para crear el archivo de credencialesdef create_credentials_file(user, password, domain):    try:        os.makedirs(samba_credentials_path, 0o700, exist_ok=True)    except FileExistsError:        print("El directorio ya existe :D")

Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>