Giter VIP home page Giter VIP logo

Comments (6)

mute019 avatar mute019 commented on August 21, 2024 1

Okay, I will open a pull request tomorrow.

from zeekctl.

awelzel avatar awelzel commented on August 21, 2024

Thank you. Not sure how this hasn't come up, seems SafeConfigParser has been deprecated since Python 3.2.

I think just using ConfigParser should be more appropriate. How would you feel about opening a PR?

In [3]: configparser.SafeConfigParser()
<ipython-input-3-980feb9aa499>:1: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead.
  configparser.SafeConfigParser()
Out[3]: <configparser.SafeConfigParser at 0x7fed340b3580>

from zeekctl.

awelzel avatar awelzel commented on August 21, 2024

Might be good to understand why zeekctl didn't show the deprecation warning or why no test caught that.

from zeekctl.

ckreibich avatar ckreibich commented on August 21, 2024

It's pretty funny — the deprecation warning comes from warnings.warn(..., DeprecationWarning), which only shows when happening in __main__ or when PYTHONDEVMODE=1:

$ zeekctl
Hint: Run the zeekctl "deploy" command to get started.

Welcome to ZeekControl 2.5.0-24

Type "help" for help.

[ZeekControl] >
$ PYTHONDEVMODE=1 zeekctl
/home/christian/inst/opt/zeek/lib64/zeek/python/zeekctl/ZeekControl/config.py:389: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead.
  config = configparser.SafeConfigParser()
Hint: Run the zeekctl "deploy" command to get started.

Welcome to ZeekControl 2.5.0-24

Type "help" for help.

[ZeekControl] >

They didn't yell loud enough for us to notice...

from zeekctl.

mute019 avatar mute019 commented on August 21, 2024

Okay, another issue, I guess. In the documentation, it is not explicit mentioned in the documentation of the zeekctl whether we should run zeekctl using sudo command.

Without sudo I am able to access the zeekctl but I am still facing an issue with permissions.

`zeekctl
Error: failed to write file: [Errno 13] Permission denied: '/usr/local/zeek/spool/.zeekctl-config.sh.tmp'

Welcome to ZeekControl 2.5.0-39

Type "help" for help.

[ZeekControl] > deploy
Error: failed to read lock file: [Errno 2] No such file or directory: '/usr/local/zeek/spool/lock'
Error: Unable to get lock
[ZeekControl] > exit
`

Hence, the conclusion:

With RawConfigParser only root can access zeekctl.
With ConfigParser both root and normal user are able access zeekctl but the normal user is facing issues with permissions.

from zeekctl.

mute019 avatar mute019 commented on August 21, 2024

Okay, another issue, I guess. In the documentation, it is not explicit mentioned in the documentation of the zeekctl whether we should run zeekctl using sudo command.

Without sudo I am able to access the zeekctl but I am still facing an issue with permissions.

`zeekctl Error: failed to write file: [Errno 13] Permission denied: '/usr/local/zeek/spool/.zeekctl-config.sh.tmp'

Welcome to ZeekControl 2.5.0-39

Type "help" for help.

[ZeekControl] > deploy Error: failed to read lock file: [Errno 2] No such file or directory: '/usr/local/zeek/spool/lock' Error: Unable to get lock [ZeekControl] > exit `

Hence, the conclusion:

With RawConfigParser only root can access zeekctl. With ConfigParser both root and normal user are able access zeekctl but the normal user is facing issues with permissions.

Sorry, I overlooked the FAQ section in the documentation.

from zeekctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.