Author Topic: Access consistency with write permissions.  (Read 10100 times)

Don

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Access consistency with write permissions.
« on: October 12, 2006, 08:15:35 PM »
I've been using visual slick-edit for approx 1 year with good results.  Recently I rebuilt several projects and find I'm having a problem getting the editor to use my Unix file permissions.  I can open and browse files fine through the tagging feature, however I'm allowed to edit a file regardless of the r/w permissions.  This is causing some grief as I use a source control product - perforce - to check out source code and don't want to continuously have to check if I have in fact checked the particular source file out before editing.  Formerly I could rely on the pop-up window to warn me of a source file that didn't have write permissions.  Now, I'm allowed to change the file even if I don't have write permissions.  How do I configure the editor to look at read / write permissions and act appropriately?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #1 on: October 13, 2006, 02:19:33 PM »
Make sure that "Protect read-only mode" is checked.  Tools>Options>General Options>More Tab.  If this doesn't fix your problem, are you logged on as root or a user with root permissions?  It should work either way, but could help narrow down the problem.

Don

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Access consistency with write permissions.
« Reply #2 on: October 13, 2006, 04:29:13 PM »
Hi Clark,
     I have "Protect read-only mode" turned off currently, though it doesn't seem to make much of a difference.  The help file describes that option as "When on, the editor will allow a file to be modified that is read-only. The Save command always prompts for a different output file name if the file is in read-only mode."  Since I don't want to modify a read only file, I've turned the option off.  I'm also logged in as the owner of the file.  I'm beginning to suspect a more basic issue here.  When I toggle the R/W button on the status bar at the bottom of the screen I get the message "Unable to update read only attribute for this file".  I have moved files to a different server.  I am currently using an older version of slickedit - Vsn 9.0.4.  I'm in the process of evaluating vsn 11 of slick edit.  Initial results seem to show the same behavior.

Additional posting:  I guess I'm a bit confused as to how the product is supposed to work.  I find in Vsn 11 (not vsn 9) that in spite of the help description I quoted above, the Protect read-only mode switch does in fact protect a file if it's in read only mode.  So, that's half the battle.  The other problem is that whenever I bring up a new file via a tag definition, the file is invariably desgnated r/w, when in fact it is not.  I then don't know if it's r/w because I have already checked it out, or it's r/w because this is the first time the file is being displayed.

Don


« Last Edit: October 13, 2006, 06:02:35 PM by Don »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #3 on: October 13, 2006, 05:46:17 PM »
The documentation is backwards.  The documentation needs to be fixed.  If you want read-only mode protected, you must turn on "Protect read-only mode".  This may not be your problem though.

When I uncheck "Protect read-only mode" this definitely makes a difference for me for any buffer with "RO" and not "RW" in the status bar.  Do the files you think should be openned read-only have "RO" in for the buffer status?  If "RO" is not there, what are the permissions on the file/user/group and all the stuff I would need to try to duplicate this.

Don

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Access consistency with write permissions.
« Reply #4 on: October 13, 2006, 06:07:57 PM »
No, the files that should be opened read-only are being opened as r/w in the buffer status.  The permissions are 444 for all the files not checked out by our source control app.  Again, these files are being opened as a result of a tag definition that I'm invoking.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #5 on: October 13, 2006, 06:21:15 PM »
Does this also happen if you use file open instead of tagging to open the file?  In the meantime, I check this out.

Don

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Access consistency with write permissions.
« Reply #6 on: October 13, 2006, 06:28:53 PM »
Yes, if the file is opened via the file open dialog, the file becomes r/w, even though the file permission is read-only.  If I check the "Open as read-only" check box, then the file does in fact get opened as read-only.  Unfortunately, all of my file opens are the result of chasing down tag definitions rather than using the file open dialog.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #7 on: October 16, 2006, 02:30:24 PM »
I haven't been able to reproduce this yet.  I logged on as a user which does not have root permissions, created a file with permissions -r--r--r--, opened the file, and it comes up read only.

At this point, I think that there's some configuration item that got changed or something in the auto-restore information.

Rename your ".slickedit" (in your $HOME directory) to ".slickedit.old".  Hopefully, this will fix the problem.








Can't say I know what's going on here.  Are the files you are editing local or remote? If remote, try reproducing this with a local file.  What version of the editor do you have (go to Help>About SlickEdit)?  What Unix are you running under?

Now, I'm guess that the access() function is failing.

If I can't figure this out from the above info, you'll need to contact support and send them your vslick.stu in your $HOME/.slickedit/editor_version/.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #8 on: October 16, 2006, 11:04:37 PM »
Oops, look like I messed up my last post. I need a descent editor for my posts:-).  Here's the corrected post.

I haven't been able to reproduce this yet.  I logged on as a user which does not have root permissions, created a file with permissions -r--r--r--, opened the file, and it comes up read only.

At this point, I think that there's some configuration item that got changed or something in the auto-restore information.

Rename your ".slickedit" (in your $HOME directory) to ".slickedit.old".  Hopefully, this will fix the problem.

pochtara

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Access consistency with write permissions.
« Reply #9 on: November 01, 2006, 07:23:03 PM »
Hi:
I'm a new user of ClickEdit v8.0. I have an issue to make RO files that are under source control to be RW, by toggle RO/RW mode. The file in the tool's window becomes RW, but when I want to save it, the tool will not allow me to do it, produsing warning window: "Unable to save ....xxx.c Access Denied. Possible causes: Another program has this file open. See help on Backup options."
I've tried to check/uncheck the famous Protect Read-Only flag option and it did not make a difference.

What I'm trying to achieve is to make RO file RW (remove read-only property on it) so I can save my changes in it without going to the file location and right-click on the file and do it. It seams the tool does not want to do it for me.

Any ideas?!
Thanks
Alex

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Access consistency with write permissions.
« Reply #10 on: November 01, 2006, 08:28:31 PM »
I took a quick look at V8.  Save isn't that smart.  You need a newer version of SlickEdit.

When you Save in V11, it will detect failure due to read only and prompt you whether you wish to change the permissions.  This feature works with the Windows readonly file attribute (which it sounds like you're using) and Unix permissions (if you have permission).  Theres no support in V11 for NTFS permissions.