Lost access to my folder


#1

I was being a happy new user and created my first schematic. Fortunately, I have been saving it regularly. Then I did something that now appears to be stupid. I moved the folder kicad was saving the file to. The next time I tried to save the work, it could not be saved because I don’t have access to that folder. The folder appears not to have actually been moved as it is still in the original place. None of the other folders or files in the parent folder are there, so they all got moved. The folder in question was copied, so I have an hour old copy - I think - but I have not tried to open it yet.
1st - why did I lose access to this folder and how do I get it back?
I tried to takeownership, but I am totally locked out of changing permissions.
2nd - why can’t I do a “save as” to change the location for storage? The only option I can find is “save”.
update
apparently, kicad locked that folder down and it couldn’t even access it.
I tried the admin account - it couldn’t do anything.
I finally opened the last backup but kicad had to shut down what I had. Fortunately, the changes are only about 15min work. When I closed that down I went back to the folder and it was gone.
I think this may be an operational issue with kicad, but that is beyond my pay scale.
It seems that the folder was already moved which is why kicad couldn’t write to it, but it was still there as far as windows was concerned because kicad was using it. But since it really wasn’t there, it could not be accessed by anyone.
A “save as” function may also be a useful thing. At least I would have been able to save my last changes. So, yes, I should not move a folder that has a file open in a program. Normally, that is not possible. but maybe that was because kicad locked the folder and not the file.


#2

OS you’re using?
KiCAD ver you’re using?

Do you have this button? Might solve your issue with incremental backups for the time being and allows you to specify where to store it…

But yeah, yanking the file/folder structure from underneath a running tool is never a good idea.
Most lock the files they access, I think that’s even a OS feature to secure file I/O to not run into race conditions.
And moving folders usually is being done by the OS via copying the content first and then deleting it from where it was if things move between partitions. On a partition this might not actually happen really, as it would be enough to change the pointer to the files from the old locations to the new location. No need to move bits around.


#3

Were you running KiCad as Administrator? Never do this.


#4

Why? What it wrong with it?
I always run KiCad as Administartor as I have (Windows 7) only one account at my PC and I have just first time ever clicked in the graphic [Dell] symbol to check if my account is really Administrator (to be sure I don’t lie).
Even I am administrator I had with 4.0.6 problems with access to kicad.pro (in doccumentation it was said to configure KiCad and save it in kicad.pro). I expect more such problems if I were not administartor (but never checked it). Many years ago I tried to work being not administrator (Windows XP) but gave up - for example I couldn’t use Builder 5. I remember that experience as a problem with really any simple task which normally works just didn’t worked.
I have found that if I install KiCad not in standard “Program Files” dir but in created by me another directory it solves the problem with kicad.pro so since then I decided to not install KiCad in “Program Files”. I don’t know if KiCad still has some problems with kicad.pro but will not check.
I just don’t wont to see how many problems I could have if I will try to work from not administartor account. I don’t suppose that Builder 5 have from any reason changed its behaviour, but didn’t tested it at Windows 7 (may be problems from XP disapeared in Win 7 - who knows). From administartor account Builder works well.


#5

Running with admin rights is never a good idea. If you open a mail attachment then it will be automatically run in admin mode -> really bad idea! (Opening untrusted content is already bad enough. Opening it with full file system access is really bad.)

One really should have one account for normal usecases only and a separate account for administrative purposes. Ideally these two have different passwords with the admin password being extremely strong.

I would assume that all modern windows versions do this already automatically. (At least in windows 10. Not sure how 7 and 8 worked. Widows XP did not do that.)

In windows 10 i get a notification that i need to enter admin cretentials if i need admin rights. I can enter the cretentials of my normal user at this stage (if my user is setup to be an admin). Important to note is that i only get admin rights at this point. (Or more precisely: The one process that requested admin rights gets them at this point.)
Something similar with running programs. If i run kicad normally then i can not for example change the system libraries. But if i rightclick and select “run as admin” i can. (Again windows will prompt me to enter the cretentials fo an admin account at this point.)


Meaning if windows 7 is anywhere similar to windows 10 then you will most likely not run kicad as admin even if your user account has admin rights enabled.


This all is also similar in most modern linux distributions. One can not run the graphical interface as the root account. But one can give root rights to a specific application by running it from the terminal with sudo. (Bad idea in general. I think some linux distros even prohibit running normal apps as root or it is at least an idea for the future. Might be one of these things that will come with wayland.)


#6

I was sure that there are accounts with admin rights and others without and if you are logged to account with admin rights then you are running with admin rights. May be it was such in Windows XP when I was trying to work at normal (not admin) account and gave up. When I moved (2 years ago) to Windows 7 I didn’t do eny checks in that subjects. From what you are writeing I understand that it can be such, that even being logged to admin account you can run without admin rights, and if you need them system will ask.
A month ago I was “switching on” for the first time the computer with Windows 10. What I wonted to do was to make a backup of empty system (for any case). What I don’t understand is that when I copied that backup file to pendrive it took 2 times less space than on (empty) HDD. I left it for future check, and forgot. It happened few times that it said me that to do what I wont I need the admin rights and only what I have to do was to click [OK] button. I was surprised why I got such questions when I need only accept it. As that never happened to me at Windows 7 I suppose that works differently and may be when I am logged to admin account at Win 7 I just run with admin rights.

Enyone knows how can I know if I run with admin rights or not?

Not my guilt that it works such. It shouldn’t :slight_smile:

Libraries list or libraries contents?
List I have changed few days ago (checks for my bug report) - no problem.
Contents - I just copied first Battery holder footprint with new name and then deleted it - no questions asked.

Now: It is because I have admin rights or because I installed KiCad not in “Program Files” dir? :slight_smile:

Till now I accept how computer works for me and don’t wont to change anything (one exception I don’t like that Builder 2010 I can run only once after each switch on of Windows 7, but use it so sporadically that it is not a big problem).


#7

For cases like this I usually change the security settings of the file or even folder to allow all users to change the file/folder and it’s content (within reason).


#8

Probably the best solution, but…
I don’t like to do anything I don’t understand fully what I am doing. I tried to understand the security hierarchy - which flag setting means what and … It is to difficult for my little mind.
Next I would probably had to do it each time I install the next KiCad version (this year 5 versions times 2 computers).


#9

Now that we have symbol library tables you should not have any reason left to edit any kicad system file.

System libraries are not meant to be changed by the user. (Next update will kill your work.)
If you want to customize the system libraries go with the advanced setup i described here: Library management in KiCad version 5


#10

There is a big difference between being a user with administrator rights and “run as administrator”.
The latter should not be used for KiCad


#11

I suppose (not checked yet) that when you are doing: File|New|Project… than Page Layout Description files (for sch and PCB) are taken from kicad.pro. If not from it then I have no other idea where from.
To not use kicad.pro one could do File|New|Project from Template. I spend short time trying to use my other project as template but failed. I don’t know how to make my template. As from my point of view it is not important I left myself such problems for future investigation.