• Re: setcap command

    From Gamgee@1:103/705 to Ghost on Mon Oct 10 21:33:00 2022
    Ghost wrote to Gamgee <=-

    Re: Re: setcap command
    By: Gamgee to Ghost on Mon Oct 10 2022 08:18 am

    sbbs@greg-Virtual-Machine:~/sbbs/exec$ sudo setcap
    cap_net_bind_service=+
    ep /home/sbbs/sbbs/exec/sbbs Failed to
    set
    capabilities on file `/home/sbbs/sbbs/exec/sbbs' (Invalid
    argument) The value of the capability argument is not permitted
    for a file. Or the file is not a regular (non-symlink) file

    any help would be appreciated. I have looked on the web and could
    not come up with anything better than what I have done here.

    My guess is that the 'sbbs' executable (/home/sbbs/sbbs/exec/sbbs) is actually a symlink to the actual file (/home/sbbs/sbbs/repo/exec/sbbs),
    and it's failing for the reason given in that error message regarding a
    syml
    ink.

    Well, I haven't set up any symlinks, so unless it was done when
    installed, I don't know. However, I tried your suggestion and got
    the same response from the system.

    Well, if you followed the installation instructions example, you may
    have set up symlinks. On your "make install" command line to install,
    did you also include "SYMLINK=1" ?

    Or just do the command "ls -l" while in the /sbbs directory, and see if
    there are symlinks there, or not.



    ... Gone crazy, be back later, please leave message.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Ghost@1:153/143 to Gamgee on Tue Oct 11 09:35:30 2022
    Re: Re: setcap command
    By: Gamgee to Ghost on Mon Oct 10 2022 09:33 pm

    Or just do the command "ls -l" while in the /sbbs directory, and see if there are symlinks there, or not.



    have set up symlinks. On your "make install" command line to install,
    did you also include "SYMLINK=1" ?

    Or just do the command "ls -l" while in the /sbbs directory, and see if there are symlinks there, or not.

    I tried another suggestion last night and it is now working correctly.
    Thanks for the help
    --- SBBSecho 3.11-Win32
    * Origin: Ice Castle BBS, Anchorage, AK (1:153/143)
  • From Charles Blackburn@1:103/705 to Gamgee on Tue Oct 11 16:09:48 2022
    Re: Re: setcap command
    By: Gamgee to Ghost on Mon Oct 10 2022 08:18:00

    Ghost wrote to All <=-

    I have tried (and failed) using the setcap command to allow the
    ports <1024 to be used, but the command has failed with the
    following:

    sbbs@greg-Virtual-Machine:~/sbbs/exec$ sudo setcap cap_net_bind_service=+ep /home/sbbs/sbbs/exec/sbbs Failed to set capabilities on file `/home/sbbs/sbbs/exec/sbbs' (Invalid
    argument) The value of the capability argument is not permitted
    for a file. Or the file is not a regular (non-symlink) file

    My guess is that the 'sbbs' executable (/home/sbbs/sbbs/exec/sbbs) is actually a symlink to the actual file (/home/sbbs/sbbs/repo/exec/sbbs), and it's failing for the reason given in that error message regarding a symlink.

    symlinks shouldnt matter in this regard, most likely the path is wrong (or h isnt root when he is running the commanf)...
    the /home/sbbs/sbbs bit looks suspect, but i don't know how he has installed it.

    setcap works fine on symlinks

    regards
    ---

    Charles Blackburn
    The F.B.O BBS 21:1/221 618:250/36
    bbs.thefbo.us IPV4/V6
    DOVE-Net FSX-Net MicroNET USENET




    ... A really busy person never knows how much he ways.
    ---
    þ Synchronet þ The FBO BBS - bbs.thefbo.us - A place for aviation fun....
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Charles Blackburn on Thu Oct 13 14:05:10 2022
    Re: Re: setcap command
    By: Charles Blackburn to Gamgee on Tue Oct 11 2022 04:09 pm

    setcap works fine on symlinks

    No, it does not. If /sbbs/exec/sbbs is a symlink, for example, attempting to setcap on it results in this error (as was previously reported):

    $ sudo setcap cap_net_bind_service=+ep /sbbs/exec/sbbs
    Failed to set capabilities on file `/sbbs/exec/sbbs' (Invalid argument)
    The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #49:
    KD = King Drafus (Allen Christiansen)
    Norco, CA WX: 76.0øF, 66.0% humidity, 2 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)