Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 57717 invoked from network); 11 Sep 2008 17:58:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 17:58:37 -0000 Received: (qmail 46048 invoked by uid 500); 11 Sep 2008 17:58:32 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 46029 invoked by uid 500); 11 Sep 2008 17:58:32 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 46014 invoked by uid 99); 11 Sep 2008 17:58:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 10:58:32 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 17:57:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D1700234C1DD for ; Thu, 11 Sep 2008 10:57:44 -0700 (PDT) Message-ID: <1989847479.1221155864856.JavaMail.jira@brutus> Date: Thu, 11 Sep 2008 10:57:44 -0700 (PDT) From: "Pete Wyckoff (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-4108) FileSystem support for POSIX access method In-Reply-To: <37364288.1220846564500.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-4108?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D126= 30277#action_12630277 ]=20 Pete Wyckoff commented on HADOOP-4108: -------------------------------------- this is something like: {code} public class FileStatus { + private FsAction userAccess; + public fsAction getUserAccess() { return userAccess; } + public void setUserAccess(FsAction userAccess) { this.userAccess =3D us= erAccess; }=20 {code} Right? And the filesystem API for getFileStatus will set it? +1 I am assum= ing there are no performance implications of creating this on every getFile= Status which there shouldn't be I wouldn't think. > FileSystem support for POSIX access method > ------------------------------------------ > > Key: HADOOP-4108 > URL: https://issues.apache.org/jira/browse/HADOOP-4108 > Project: Hadoop Core > Issue Type: New Feature > Components: fs > Reporter: Pete Wyckoff > Assignee: Pete Wyckoff > > From man access: > {code} > int access(const char *pathname, int mode); > {code} > DESCRIPTION > access checks whether the process would be allowed to read, wri= te or test for existence of the file (or other file system object) whose na= me is pathname. If pathname is a symbolic link permissions of the file ref= erred to by this symbolic link are tested. > mode is a mask consisting of one or more of R_OK, W_OK, X_OK and F= _OK. > R_OK, W_OK and X_OK request checking whether the file exists and h= as read, write and execute permissions, respectively. F_OK just requests c= hecking for the existence of the file. > The tests depend on the permissions of the directories occurring i= n the path to the file, as given in pathname, and on the permissions of dir= ectories and files referred to by symbolic links encountered on the way. > The check is done with the process=C3=A2s real uid and gid, rather= than with the effective ids as is done when actually attempting an operati= on. This is to allow set-UID programs to > easily determine the invoking user=C3=A2s authority. > Only access bits are checked, not the file type or contents. T= herefore, if a directory is found to be "writable," it probably means that = files can be created in the directory, > and not that the directory can be written as a file. Similarly, a= DOS file may be found to be "executable," but the execve(2) call will stil= l fail. > If the process has appropriate privileges, an implementation may i= ndicate success for X_OK even if none of the execute file permission bits a= re set. > RETURN VALUE > On success (all requested permissions granted), zero is returned. = On error (at least one bit in mode asked for a permission that is denied, = or some other error occurred), -1 is > returned, and errno is set appropriately. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.