Newbie question

TAG_TEAM

Dabbler
Joined
Mar 18, 2017
Messages
26
First question, I set up a SMB share on one of my zvol's and inside the shared folder is:

.bash_logout
.bashrc
.profile

I know I have seeen posts about this but couldn't find an answer. My other machine is set up the same way but doesn't have these files in the SMB shared folder. Is there any way I can get rid of these (move them I am thinking???) I know it is because of the SMB share, but I don't want to accidentally delete these and hose my share in the process. Thanks in advance. BTW, the share is empty right now so I could do just about anything to make TrueNAS not put those files in that folder.
 
Last edited:

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
When you say zvol - do you mean dataset?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I know I have seeen posts about this but couldn't find an answer. My other machine is set up the same way but doesn't have these files in the SMB shared folder.

That's not a zvol. It is, however, something that you set as a UNIX home directory for a user you've created (presumably on the NAS). Removing these files might make UNIX logins work "weird" for this user, but if that doesn't concern you, they're completely safe to remove.
 

TAG_TEAM

Dabbler
Joined
Mar 18, 2017
Messages
26

TAG_TEAM

Dabbler
Joined
Mar 18, 2017
Messages
26
That's not a zvol. It is, however, something that you set as a UNIX home directory for a user you've created (presumably on the NAS). Removing these files might make UNIX logins work "weird" for this user, but if that doesn't concern you, they're completely safe to remove.
Okay, that sounds weird. If I recreate my username and don't point it at that dataset, will everything be right in the world to delete them? The odd thing is too that the time is wrong on them. I am having an additonal problem with the time displaying correctly and with the correct timezone, but files read the wrong times. Guess that is a post in of itself. I'll poke around with my user(s).
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Okay, that sounds weird. If I recreate my username and don't point it at that dataset, will everything be right in the world to delete them?

Should be. They are not critical files and your NAS will not drown puppies or commit other horrifying acts if you remove the files. It is just that any UNIX logins (especially SSH) might not function the way you might expect.

The odd thing is too that the time is wrong on them.

You likely have some misconfiguration. UNIX uses a time based off UTC, so you need to make sure your BIOS RTC is set to UTC, and that timezones are appropriately set in the GUI, on your PC, etc. Timezones are what we refer to as a "local affectation" in that it is displayed for user convenience in your "local" timezone. Try this in the shell:

Code:
# sh
# TZ="America/Chicago" date
Sat May 20 18:10:50 CDT 2023
# TZ="Africa/Lagos" date
Sun May 21 00:10:55 WAT 2023
# TZ="America/Caracas" date
Sat May 20 19:11:02 -04 2023
# TZ="Asia/Qatar" date
Sun May 21 02:11:07 +03 2023
#


You can see that the TZ setting creates a date that is localized to whatever TZ indicates, but underlying it is a 32-bit time_t integer that is the same regardless of where you are. If your time is "off", the usual explanation is that you've not got the timezone set up correctly, or possibly failed to set up NTP.
 

TAG_TEAM

Dabbler
Joined
Mar 18, 2017
Messages
26
Code:
Code:

# sh
# TZ="America/Chicago" date
Sat May 20 18:10:50 CDT 2023
# TZ="Africa/Lagos" date
Sun May 21 00:10:55 WAT 2023
# TZ="America/Caracas" date
Sat May 20 19:11:02 -04 2023
# TZ="Asia/Qatar" date
Sun May 21 02:11:07 +03 2023
#


First, thank you jgreco for addressing this here. What you say makes perfect sense although my web server likes to have its BIOS set to local time and of course all Windbloz machines do too. I am always learning! This has been an odd adventure since when I set up my first TrueNAS Scale server I had no issues at all and I had no time in on it. Now year(s) later this install is doing all manner of strange stuff I have never seen.

I have one more question for you or the community but will post a new thread as should be done. Thanks again, I'll change the BIOS time right away.

Incidentally the other tiny thing I can't believe I never noticed was one can type sh by itself to get the text entry prompt - ran many things via bash and what not, but thanks for the incidental education!
 
Last edited:

TAG_TEAM

Dabbler
Joined
Mar 18, 2017
Messages
26
Ah ha! As I suspected the time issue was the problem with reporting! Yay! Thanks again, now I am down to one-two problems.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
sh by itself to get the text entry prompt

The purpose in this case was to ensure you are in the Bourne shell. Other shells may not support per-command setting of environmental variables, which is sometimes handy as I just demonstrated. Won't work in C shell, T shell, etc.
 
Top