[SOLVED] Vs code permissons

Hi all I have been trying to figure this out for hours. I cant get openhab to allow vs code to edit files. My host name is openhabian not openhabianpi and I cant change it in the settings folder anywhere . I have built everything do far in the nano editor and would really like to see this up. I have samba setup and have mapped the conf folder.

Any help would be appreciated.

Thanks
Jared

Is samba setup and running on your pi?

Meaning on a windows computer you should be able to type \\openhab or \\ipaddress in windows explorer and see all the available shares.

If no shares show then we need to address the samba config. If you cant access the pi, then i suspect a firewal or samba not running.

If you are saying you can see the files but vs code does no t edit save or read them, then you have a permissions issue on the pi. I am pretty sure sudo chmod -r 777 /etc/openhab2/* should fix. I am just not sure if 777 is the correct permissions, they may be more open than necessary.

Thanks alot sir. That got it done. Once I searched that command it instantly popped up to bad I didnt see it a couple of days ago. To answer all your questions samba is working great, I’ll read up on the chmod command so I will at least know a little about what I just had the system do.

Thanks again.
Jared

1 Like

Glad I could assist. This is all about learning. I had my samba issues back in the day. Still do from time to time.

Have a read about chmod, it can been interesting. In general, here is what happened. When windows sees the files and edits it’s doing it as a user different than the Linux user that created the files. The command sites above allows all users to modify files.

With lots of reading and learning you can fix things such that all users match. When we are just getting started learning these things though the time to do all that is not always worth it. Plus the added security benefit is minimal on an internal hobby setup.

Happy I could help, enjoy openhabbing!

I’ll check out the commands, that is the trickiest part for me, I started a notebook. The experience has been great and I can usually find the answer in the community. I’ll eventually get the samba setup learned as I wanted to do some hobby networking stuff just for the experience.

If I put the openhab server on a seperate vlan and I am the only one that touches it at home is there any huge security concern? I probably wont get to samba for 6 months. I plan on installing some more devices and diving into config files and learning the rules system.

Thanks
Jared

In my opinion no. You will always find naysayers.

In fact in my opinion it’s not a concern even in your main network. The reason being is because generally speaking you only risk someone on your (a teenager for example) Wi-Fi corrupting your config. If you have backups you restore them and move on.

I just wanted to let you know that the files were open to others in your local network. Figured it’s the proper thing to do.

Best of luck and wish you the best on learning this new world!