|
Dear all,
I saved a file with read-only permission. Can I undo this with syntax? I tried to save it with '/permissions writeable' but SPSS obviously refuses this. TIA! Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com |
|
Ruben,
I might be missing exactly what is going in your particular situation (if so, please elaborate) but I can effectively alter the read/write permissions by using the PERMISSIONS syntax. So I cannot recreate what you are describing. I attempted to do this several ways... First Attempt: set 'read only' via syntax - saved datafile - altered the datafile and got an error message when trying to save ('read only is set'). Then I attempted to make the file 'writable' via syntax, and it works fine when trying to save (thus removing the read only permissions). So. syntax read only and write only work as intended (no surprise here). Second Attempt: I went into the document properties via the file in Windows Explorer (Windows 7), marked the file as "read only", opened in SPSS, altered the contents of the datafile (as before) - tried to save it and got an error message saying it was a "read only file" (just like before) - went into syntax told it to make it 'writable' and it effectively removed the 'tick' off the 'read only' option in the files properties in Windows Explorer thus allowing me to save/alter the file freely. Be advised: as per the SPSS help file/syntax guide (v17) it gives the following: PERMISSIONS Subcommand (PERMISSIONS command) WRITEABLE File permissions are set to allow writing for the file owner. If file permissions were set to read-only for other users, the file remains read-only for them. The underlined part is testament to the behavior I witnessed, and the bold parts may be related to your problem. The only things I can think of are: 1. Are you logged in on your computer as full admin? or 2. Did you create the file on one computer and then migrate it over to another workstation (thus simulating 'multiple users')? (not sure how either of those alter the ability to mark the file as read/write but that may be what is preventing you). As a possible workaround I would try removing the 'read only' mark via the file properties directly within Windows (assuming you are using Windows) - then, once you have 'full command' of the file, attempt to open, save, alter, change permissions, etc etc. The goal here would be to release the file from any 'unseen' permission settings that belong to another 'user' and giving your current workstation the full rights to the file. Note that I am using the following syntax (I am assuming you are using the exact same thing as per your email): PERMISSIONS FILE= 'C:\Users\desk\Desktop\Ruben Test\sample.sav' What error is SPSS giving you? HTH, J. R. Carroll Grad. Student in Pre-Doc Psychology at CSUS Research Assistant for Just About Everyone. Email: [hidden email] -or- [hidden email] Phone: (916) 628-4204 On Mon, Aug 23, 2010 at 1:36 AM, Ruben van den Berg <[hidden email]> wrote:
|
|
In reply to this post by Ruben Geert van den Berg
The documentation seems to be mistaken
on this point, since it says that you can overwrite a read-only file by
specifying WRITEABLE on the PERMISSIONS subcommand of a subsequent SAVE
command, but it would appear that this does not work. You can, however,
change the permissions with the PERMISSIONS command, as in :
data list free /x. begin data 1 2 3 end data. save outfile='c:\temp\temp.sav' /permissions=readonly. *this won't work.. save outfile='c:\temp\temp.sav' /permissions=writeable. *this will work. permissions file='c:\temp\temp.sav' /permissions writeable. save outfile='c:\temp\temp.sav'. The PERMISSIONS command and the various PERMISSIONS subcommands change the operating-system level permissions. So your ability to change those permissions is dependent on what rights you have on that operating system.
Dear all, I saved a file with read-only permission. Can I undo this with syntax? I tried to save it with '/permissions writeable' but SPSS obviously refuses this. TIA! Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com |
|
Dear Rick and Justin,
Thanks, it's working. I was completely unaware of the PERMISSIONS command. Best, Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com To: [hidden email] CC: [hidden email] Subject: Re: Syntax to change .sav file permissions From: [hidden email] Date: Mon, 23 Aug 2010 08:00:01 -0500 The documentation seems to be mistaken on this point, since it says that you can overwrite a read-only file by specifying WRITEABLE on the PERMISSIONS subcommand of a subsequent SAVE command, but it would appear that this does not work. You can, however, change the permissions with the PERMISSIONS command, as in : data list free /x. begin data 1 2 3 end data. save outfile='c:\temp\temp.sav' /permissions=readonly. *this won't work.. save outfile='c:\temp\temp.sav' /permissions=writeable. *this will work. permissions file='c:\temp\temp.sav' /permissions writeable. save outfile='c:\temp\temp.sav'. The PERMISSIONS command and the various PERMISSIONS subcommands change the operating-system level permissions. So your ability to change those permissions is dependent on what rights you have on that operating system.
Dear all, I saved a file with read-only permission. Can I undo this with syntax? I tried to save it with '/permissions writeable' but SPSS obviously refuses this. TIA! Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com |
| Free forum by Nabble | Edit this page |
