Code Monkey home page Code Monkey logo

Comments (7)

p-rintz avatar p-rintz commented on June 8, 2024 1

Its one of the commands that will be gone with the 2.0 release. (from the sudoers list)

For now, it should be fine. It doesn't really change anything from before.

It could be made more secure by changing it to the following, if you really want to:

/usr/bin/du -s /var/borgwarehouse/* | sed 's/\/var\/borgwarehouse\///' | jc --du

borgwarehouse ALL=(ALL) NOPASSWD: /usr/bin/du -s /var/borgwarehouse/[[\:xdigit\:]]*

That way you can only query the subfolders under the /var/borgwarehouse path.

from borgwarehouse.

Ravinou avatar Ravinou commented on June 8, 2024

Thanks for your feedback. I will test on Ubuntu 22.04.2 to try to reproduce your bug.

from borgwarehouse.

Ravinou avatar Ravinou commented on June 8, 2024

@Aterfax Can you tell me if it's Ubuntu with desktop env or if it's ubuntu server image without gui ? Thank you

from borgwarehouse.

Aterfax avatar Aterfax commented on June 8, 2024

Fairly sure it is Ubuntu server with XFCE on it, but is used 99% of the time headlessly.

from borgwarehouse.

Ravinou avatar Ravinou commented on June 8, 2024

Thank you, it is to allow me to reproduce the error as well as possible. I'm doing some tests today and I'll let you know.

from borgwarehouse.

Ravinou avatar Ravinou commented on June 8, 2024

I was able to reproduce the bug. It's still strange... especially since the script runs normally when I launch it manually, it causes an error only when executed by node.

I think this is a version specific problem with jc, I don't see any other explanation:

  • Debian 11 - jc 1.14.3 ✅
  • Fedora 37 - jc 1.22.5 ✅
  • Ubuntu Server 22.04 - jc 1.17.3 ❌

Thank you @Aterfax for looking for the solution and sharing it ! I'm studying it in a branch if the solution has no impact on Debian and Fedora. If it's ok, I'll modify the code to improve the compatibility with Ubuntu Server.

@p-rintz Can you validate the change in sudo permissions please ? 🙏

from borgwarehouse.

Ravinou avatar Ravinou commented on June 8, 2024

Thank you @p-rintz I'll test it. And if it is problematic it will be removed in v2 anyway so it is not very important.

from borgwarehouse.

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.