setbool

leo amine

New Member
Joined
Oct 2, 2021
Messages
5
Reaction score
0
Credits
33
hello everyone,
i wanted to change this parametre in sebool but i didn't find the line , however i followed all instructions in my exercise-book , i m blocked in this step .how can i add sftpd_enable_homedir . soemone can help me !
thanks
Capture d’écran 2021-10-02 153208.png
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,450
Reaction score
2,056
Credits
10,088
I believe you need the togglesebool command:
Bash:
togglesebool sftpd_enable_homedirs
That will toggle the status of the flag - enabling it if it’s disabled, or vice-versa!

Also, there is setsebool:
Bash:
setsebool sftpd_enable_homedirs=1
Explicitly setting the value to 1 enables that Boolean. Setting it to 0 will disable it.

Note: You may need to use sudo with the above commands. I haven’t messed with selinux for a while!
 
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,459
Reaction score
3,165
Credits
32,360
Use -P to make it permanent to have it survive reboots.
Code:
setsebool -P tftp_home_dir  on/off(or 1/0)
 
Last edited:
OP
L

leo amine

New Member
Joined
Oct 2, 2021
Messages
5
Reaction score
0
Credits
33
but the problem where is this line , maybe i didn t well explain it
1633207016369.png
 
OP
L

leo amine

New Member
Joined
Oct 2, 2021
Messages
5
Reaction score
0
Credits
33
I believe you need the togglesebool command:
Bash:
togglesebool sftpd_enable_homedirs
That will toggle the status of the flag - enabling it if it’s disabled, or vice-versa!

Also, there is setsebool:
Bash:
setsebool sftpd_enable_homedirs=1
Explicitly setting the value to 1 enables that Boolean. Setting it to 0 will disable it.

Note: You may need to use sudo with the above commands. I haven’t messed with selinux for a while!
look at my second picture i don t have this line # sftpd_enable_homedirs#
 

JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,450
Reaction score
2,056
Credits
10,088
look at my second picture i don t have this line # sftpd_enable_homedirs#

You didn’t post your second picture until after a couple of us had answered your question.
This is Linux.org, it is not the psychic hotline and we are not mind-readers! Ha ha!

If sftpd’s options are not appearing it’s likely that you don’t have sftp installed and/or do not have it configured/running properly.

So perhaps check you have it installed first.
And if you do have it installed, the next step is to check that the service is configured properly and running.

I haven’t messed with sftp for a long time, so I’ve can’t remember everything that’s involved. But a quick search using your favourite search engine should allow you to find a tutorial for setting up sftpd!
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,459
Reaction score
3,165
Credits
32,360
but the problem where is this line , maybe i didn t well explain it
View attachment 10421
You made a typo:
Code:
setsebool sftpd_enable_homedirs=1
It should be:
Code:
setsebool -P tftp_home_dir=1 or setsebool -P tftp_home_dir 1
You can also list boo-leans like this.
Code:
semanage boolean -l
sftpd_enable_homedirs doesn't exist. Also you don't use randomly set an selinux boolean. You check the the audit.log file like this.
Code:
cat /var/log/audit/audit.log | audit2allow
Then it will provide you with some output for possible solutions, it will usually first recommend a specific boolean before anything else.
 
Last edited:
OP
L

leo amine

New Member
Joined
Oct 2, 2021
Messages
5
Reaction score
0
Credits
33
You didn’t post your second picture until after a couple of us had answered your question.
This is Linux.org, it is not the psychic hotline and we are not mind-readers! Ha ha!

If sftpd’s options are not appearing it’s likely that you don’t have sftp installed and/or do not have it configured/running properly.

So perhaps check you have it installed first.
And if you do have it installed, the next step is to check that the service is configured properly and running.

I haven’t messed with sftp for a long time, so I’ve can’t remember everything that’s involved. But a quick search using your favourite search engine should allow you to find a tutorial for setting up sftpd!
thank you i will retry all steps you mentined.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Latest posts

Top