Thread: linux capabilities feature with non root user not able to set SO_MARK with setsockopt

  1. #1
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    135

    linux capabilities feature with non root user not able to set SO_MARK with setsockopt

    Hi All,

    I am having tcp server , which is running with non root user.

    Trying to set the QOS on the accepted socket.

    Currently it returns Permission Error as errno "Error:Operation not permitted". Trying to mark the packet with mark EE.

    Observation is IPTOS and IP_PRIORITY is working fine with non root user . Only with SO_MARK I am seeing this error.

    my kernel version is 4.19.183.

    Any other way I can triage more like , what exact the reason for not giving the permission . ( is it only because of non root or any other reason ). I mean like any specific logs which can be referred.


    Appreciate your time in reading this thread.

    In case any inputs on this related , please share it.

    Thanks
    vlrk

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,138
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    135
    thanks stahta01 ..I reffered this post previous , I guess he also face same issue as what I am observing.

    In between can any one give exact difference between cap_set_flag and capset .

    One visible difference I see is , with capset in /proc/$pid/task/$pid/status file capabilities are reflecting . But not the same with cap_set_flag.

    Why this so , I don't have exact answer . This also I want to know.

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with setsockopt function (linux)
    By total_RePet in forum C Programming
    Replies: 2
    Last Post: 07-02-2016, 11:57 AM
  2. Replies: 1
    Last Post: 01-12-2011, 09:49 PM
  3. linux C++ IDE with this particular feature:
    By elninio in forum C++ Programming
    Replies: 10
    Last Post: 06-04-2008, 02:30 PM
  4. Static Capabilities for a User-Defined Type
    By gozlan in forum C# Programming
    Replies: 1
    Last Post: 04-08-2003, 11:21 AM
  5. Awareness of linux capabilities
    By Unregistered in forum Linux Programming
    Replies: 5
    Last Post: 12-10-2001, 01:46 PM

Tags for this Thread