RE: How can i call a function which is usually used by root?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





--- On Tue, 12/2/08, bruce <bedouglas@xxxxxxxxxxxxx> wrote:

> From: bruce <bedouglas@xxxxxxxxxxxxx>
> Subject: RE: How can i call  a function which is usually used by root?
> To: "'Community assistance, encouragement, and advice for using Fedora.'" <fedora-list@xxxxxxxxxx>
> Date: Tuesday, December 2, 2008, 4:04 PM
> hi...
> 
> check out how to handle/setup a superuser group (sudo)
> which allows a normal
> user to assume the role/privs of the root/superuser for a
> specifically
> defined task.
> 
> should handle your issue, if i understand what you're
> attempting. there
> should be examples on the 'net as well..
> 
> 
> -----Original Message-----
> From: fedora-list-bounces@xxxxxxxxxx
> [mailto:fedora-list-bounces@xxxxxxxxxx]On Behalf Of wk
> Sent: Tuesday, December 02, 2008 1:21 AM
> To: fedora-list
> Subject: How can i call a function which is usually used by
> root?
> 
> 
> I want write a c program.And a common user(not in root
> group) will run this
> program.
> In this program,I call fread(/dev/sdc...) and
> fwrite(/dev/sdc),but this call
> will return "permission no allow".If I use the
> root user,will be ok.
> How to change to the authority to root's?
> 
> I know the  root's password.
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines:
> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


study the following... s bit is what you want:

consider the function passwd...allows the user to alter a file owned by root

 How does one set the sticky bit and set UID bits with chmod?

           octal digit>      1            2           3           4 
     octal value 

            4             set UID         r           r           r 

            2             set GID         w           w           w 

            1             sticky bit      x           x           x 



r   read 
w   write 
x   execute 
s   set UID or set GID 
t   set sticky bit 

chmod u+st  filename 
chmod -R does down the tree 


      

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux