Hi Vesna,
Thanks for the information. I haven't tested sscan on vxWorks 6.9, though
I'm told it works on vxWorks 6.8. I don't think creat() uses O_RDRW as a
file-permission mask, and I don't understand why open() would work while
creat() does not. I'm ok with making this change, but I'd like to understand
it better first.
Tim
----- Original Message -----
> From: "Vesna Samardzic-Boban" <[email protected]>
> To: [email protected]
> Sent: Monday, April 15, 2013 8:52:30 PM
> Subject: sscan/ saveData problem with RW permission, and not an NFS issue
>
> Hi All,
>
>
> Found a problem as follows:
>
> Running a scan record on a vxWorks IOC and when entering 'File
> system' in scan_saveData.adl screen, an error message in the 'Save
> status' field follows:
> "RW permission denied !!!"
>
> At first I suspected NFS but after checking it found that my problem
> was in the sscan's saveData.c and/or VxWorks is 6.9
>
> Tried two versions of sscan, 2-6-6 and 2-8-2, they gave the same
> result as above. These two versions are same regarding the
> saveData.c and its function
> checkRWpermission(char* path)
> and specifically the line
>
> file= creat(tmpfile, O_RDWR);
>
> that creates test file "rix_" with file permissions 002 (because
> O_RDRW = 2)
> (O_RDRW is flag "Open for reading and writing" or File Access
> Options)
>
> The file permissions 002 become
> -------w- in terms of rwxrwxrwx
> and hence the error "RW permission denied !!!"
>
> Found a solution by using vxWorks function open() instead of creat().
> open() - opens a file and optionally creates a file if it does not
> exist.
> open() - also offers a parameter for "mode" i.e. file permissions,
> which i set to 0x666 in the example below
>
> file = open (tmpfile, O_CREAT | O_RDWR, 0666);
>
> Then scan data can be saved as expected.
>
> BTW
> saveData.c uses open() for creating 'subdirectory'.
> fd = open (local_pathname, O_RDWR | O_CREAT,
> FSTAT_DIR | DEFAULT_DIR_PERM | 0775);
>
>
> Has anyone had similar problems ?
> Is this an sscan/saveData.c issue or vxWorks 6.9 issue (I do not have
> any other version of vxWorks) ?
> How about sscan/saveData on OS's other than vxWorks?
>
>
> Thanks Vesna
>
> P.S.
> In my vxWorks 6.9 and its ioLib.c, creat() does not offer file
> permissions (set to 0 as below):
> int creat
> (
> const char *name, /* name of the file to create */
> int flag /* file permissions */
> )
> {
> return (ioCreateOrOpen (name, flag, 0, TRUE));
> }
>
> SUPPLIERS: As of 1 January 2013, the Australian Synchrotron Company
> Ltd has changed its business name. However, the trading name will
> remain Australian Synchrotron.
> Please address all quotations and invoices to: Synchrotron Light
> Source Australia Pty Ltd (SLSA), ABN: 18 159 468 256
>
>
- Replies:
- Re: sscan/ saveData problem with RW permission, and not an NFS issue Andrew Johnson
- RE: sscan/ saveData problem with RW permission, and not an NFS issue Vesna Samardzic-Boban
- References:
- sscan/ saveData problem with RW permission, and not an NFS issue Vesna Samardzic-Boban
- Navigate by Date:
- Prev:
RE: Problem in installing asyn4-19 Mark Rivers
- Next:
Re: sscan/ saveData problem with RW permission, and not an NFS issue Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
sscan/ saveData problem with RW permission, and not an NFS issue Vesna Samardzic-Boban
- Next:
Re: sscan/ saveData problem with RW permission, and not an NFS issue Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|