search

Home  >  Q&A  >  body text

python - pycharm中如何在管理员权限下运行脚本

我在使用socket模块时,需要在管理员权限下才能运行脚本,想要用pycharm的debug功能,请问pycharm可不可以在管理员全下下运行?
windows or linux 系统下都可以说说。

PHPzPHPz2802 days ago2741

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 17:38:54

    If you use the root account to log in under Linux, then the programs and applications you run also have root permissions, but root Problems such as Permission denied may also occur under code> permissions. For example, when installing software (environment) from source code, execute ./configure. If the source code package is from If Windows is transferred to Linux through ftp, permission issues will occur. Linux下如果使用root账户登录,那么你运行的程序和应用也都是root权限,但root权限下也会出现Permission denied之类的问题,譬如源码安装软件(环境)时执行./configure,假如该源码包是从Windows通过ftp传到Linux下的,就会出现权限问题。

    鉴于你问的socketLinux下一般有端口通信.sock文件两种方式,如果是用端口通信,请检查端口占用情况;如果是.sock文件,则检查该目录的写入权限。感觉上你应该用的是端口通信……

    第一段说的configure就是因为通过ftpWindows传入Linux的文件默认是没有写入权限的。

    Windows下不太确定,平时大多管理员账户登录,所以没怎么遇到过权限问题,socket通信在PycharmSublime

    In view of the socket you asked about, there are generally two methods under Linux: port communication and .sock file. If If port communication is used, please check the port occupancy; if it is a .sock file, check the write permission of the directory. It feels like you should use port communication...🎜 🎜The configure mentioned in the first paragraph is because files transferred from Windows to Linux through ftp are not written by default. access permissions. 🎜 🎜Not sure about Windows. Most people usually log in with administrator accounts, so they don’t encounter permission problems. socket communicates in Pycharm, < It has been run under code>Sublime. Or right click: Run as administrator. 🎜

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:38:54

    sudo for linux

    reply
    0
  • Cancelreply