🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8601

Re: programacion C:permisos de un fichero

#8601
From: J.A. Gutierrez
Date: Mon, 28 Oct 2002 09:16
17 lines
1695 bytes
Oscar <lucense@hotmail.com> wrote:
: Hola, estoy escribiendo un programa en C en el que el usuario puede
: pedir que se abra un fichero para modificarlo. Me gustaria testear que
: el usuario tenga los permisos necesarios para leer y escribir sobre el
: fichero, y en caso contrario, imprimir un mensaje informandole de que
: debe ejecutar el programa como superusuario. Con que funciones lo
: puedo hacer? gracias.

	access(2)



-- 
PGP and other useless info at      \
http://www.cps.unizar.es/~spd/      \
finger://daphne.cps.unizar.es/spd    \       Timeo Danaos et dona ferentes
ftp://ivo.cps.unizar.es/pub/          \                         (Virgilio)   
Technical Details
Message-ID: <apiv96$3qa$1@news.unizar.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!logbridge.uoregon.edu!xmission!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!news.unizar.es!not-for-mail
References: <7ae3d00c.0210272004.7bbc53c9@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit
X-Google-Thread: f86c8,3ba5a33005716f17
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-10-28 00:38:24 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!logbridge.uoregon.edu!xmission!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!news.unizar.es!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: programacion C:permisos de un fichero
Date: 28 Oct 2002 09:16:22 GMT
Organization: Rank
Lines: 17
Message-ID: <apiv96$3qa$1@news.unizar.es>
References: <7ae3d00c.0210272004.7bbc53c9@posting.google.com>
NNTP-Posting-Host: daphne.cps.unizar.es
X-Trace: news.unizar.es 1035796582 3914 155.210.152.20 (28 Oct 2002 09:16:22 GMT)
X-Complaints-To: usenet@news.unizar.es
NNTP-Posting-Date: 28 Oct 2002 09:16:22 GMT
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (IRIX/6.2 (IP22))