cupsenable cups禁用
我有一个作为 www-data 运行的 Web 应用程序。我需要让该用户可以访问 cupsenable 和 cupsdisable 。它是一个未连接到互联网并运行小型内部应用程序的服务器,我需要能够让用户能够重新启用打印机。
我已经使可执行文件权限世界可执行。
测试用...
sudo -u www-data /usr/sbin/cupsenable laser_01
cupsenable: Operation failed: client-error-forbidden
I have a web application that is run as www-data. I need to have cupsenable and cupsdisable accessible for that user. Its a server that isn't connected to the internet and is running a small internal application and i NEED to be able to give the users the ability to re-enable a printer.
I have already made the executables permissions world executable.
Testing with ...
sudo -u www-data /usr/sbin/cupsenable laser_01
cupsenable: Operation failed: client-error-forbidden
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我只需要将用户添加到 lpadmin 组即可。我想多了。
I just needed to add the user to the lpadmin group. I was over thinking this.
看来您的执行权限没有问题。您必须获得许可才能使用杯子。所以仅仅修改你的 sudo 规则是不够的。事实上,在正确配置杯子后,我回滚了 sudo 修改。
尝试编辑 /etc/cups/cups-files.conf:
您可以定义一个系统组。此处添加的所有组均与 cupsd.conf 中的策略规则 @SYSTEM 匹配。
在此处添加您的用户组并重新启动 cups。
这对我有用。
It seems like you don't have a problem with the execute-permissions. You must be permitted to administrate cups. So it isn't enough to modify your sudo-rules. In fact i rolled back my sudo-modifications after configuring cups correctly.
Try to edit your /etc/cups/cups-files.conf:
You can define a SystemGroup. All groups added here match the policy rules @SYSTEM in cupsd.conf.
Add the group(s) of your user(s) here and restart cups.
That worked for me.