# Chmod 775 /*, /*/* gdm is not started



## Truculent_Freddi (Feb 23, 2021)

I've tried use different option chmod 775 /*, chmod 775 /*/*, (why I can't explain to myself), and then i'm rebooting system, amd gdm is not started. I searched the logs for errors and the only thing I found was "GdmLocalDisplayFactory: maximum number of X display failures reached: check x server log for error" - /var/log/messages. if i use xstart, it works and doesn't give any errors. the truth is what xstar is for, I don't understand. I think that some executable file does not work due to the fact that I misused chmod. i've used also mtree -U -f /etc/mtree/BSD.root.dist, var.dist, unclude.dist, sendmail.dist, usr.dist


----------



## acheron (Feb 23, 2021)

Check if /tmp has the sticky bit set.


----------



## Truculent_Freddi (Feb 23, 2021)

acheron said:


> Check if /tmp has the sticky bit set.


How can i do it?


----------



## SirDice (Feb 23, 2021)

`ls -ld /tmp`?


----------



## Truculent_Freddi (Feb 23, 2021)

drwxrwxrwt 6 root wheel 512....


----------



## SirDice (Feb 23, 2021)

Good, now read chmod(1) and sticky(7) and try to understand those permissions (hint: it's the `t`). Then check if /var/tmp has the sticky bit too (it should).

But I suspect your chmod(1) actions broke a lot more. While you may have restored some of the permissions of the base OS using mtree(8), it's not going to fix anything under /usr/local/, where third party applications (ports/packages) are installed. So your permissions are likely still messed up there.

Probably the easiest way to fix this is to uninstall everything (`pkg delete -af`), then `rm -rf /usr/local/*` and start over.


----------



## Truculent_Freddi (Feb 23, 2021)

ok, i read about sticky and chmod and i need to to remove the stick usin command chmod -t /tmp or chmod 1777 /tmp?


----------



## Truculent_Freddi (Feb 23, 2021)

IMG_2021_02_23_17_25_45_6145136015756878517035.jpg
					

Посмотреть и скачать с Яндекс.Диска




					disk.yandex.ru


----------



## SirDice (Feb 23, 2021)

Truculent_Freddi said:


> i read about sticky and chmod and i need to to remove the stick usin command chmod -t /tmp or chmod 1777 /tmp?


Both /var/tmp and /tmp are supposed to have a sticky bit. So it's correct already, I was hoping you would come to that conclusion on your own.


----------



## Truculent_Freddi (Feb 24, 2021)

unfortunately it didn't help


SirDice said:


> Both /var/tmp and /tmp are supposed to have a sticky bit. So it's correct already, I was hoping you would come to that conclusion on your own.


when I turn on the system, instead of starting gdm, it displays a black screen


----------



## Truculent_Freddi (Feb 24, 2021)

SirDice said:


> Both /var/tmp and /tmp are supposed to have a sticky bit. So it's correct already, I was hoping you would come to that conclusion on your own.


Do you think I should reinstall the system completely or deal with the consequences?


----------



## SirDice (Feb 24, 2021)

Truculent_Freddi said:


> Do you think I should reinstall the system completely or deal with the consequences?


No need to reinstall the _whole_ system. Just remove all packages; `pkg delete -af`, then remove any remnants from /usr/local/* (make sure to backup important configuration files from /usr/local/etc/ if you have them). And install the packages you need again. The installation of the packages will recreate the required directories and will set all the permissions correctly again.


----------



## Truculent_Freddi (Feb 24, 2021)

SirDice said:


> No need to reinstall the _whole_ system. Just remove all packages; `pkg delete -af`, then remove any remnants from /usr/local/* (make sure to backup important configuration files from /usr/local/etc/ if you have them). And install the packages you need again. The installation of the packages will recreate the required directories and will set all the permissions correctly again.


i used the method you described, rebooted the system and now i cant login to the console, login incorrect


----------



## SirDice (Feb 24, 2021)

None of that would have an effect on the base OS.


----------



## Truculent_Freddi (Feb 24, 2021)

The most recent version of pkg-1.16.3 is already installed i cant install anything


----------



## SirDice (Feb 24, 2021)

`pkg bootstrap -f`


----------

