Linux Permission Denied while ./tfs

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,922
Best answers
81
Reaction score
700
sudo chmod 777 tfs
 
OP
Klonera

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
516
Best answers
1
Reaction score
78
Location
Sweden
why is it like this?
 

sasdasxc

Active Member
Joined
Oct 31, 2017
Messages
64
Best answers
3
Reaction score
26
Do not use 777 you can be hacked
Go to www folder
Code:
cd /var/www
or
Code:
cd /var/www/html
and press comand:

Code:
chown -R www-data:www-data /var/www/html
or
chown -R www-data:www-data /var/www
Code:
chmod -R 755 /var/www/html
or
chmod -R 755 /var/www/html
Or
Code:
chmod -R 755 /var/www/html config/config.php
 

EvulMastah

๏̯͡๏﴿
Premium User
Joined
Aug 19, 2007
Messages
4,833
Best answers
0
Reaction score
184
777 is insecure. You probably just needed chmod +x tfs for the binary. Also, you do not need to use sudo. You are already root. For the website, do not chmod the whole dir, just the needed ones.
 
OP
Klonera

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
516
Best answers
1
Reaction score
78
Location
Sweden
777 is insecure. You probably just needed chmod +x tfs for the binary. Also, you do not need to use sudo. You are already root. For the website, do not chmod the whole dir, just the needed ones.
i already used 777 tho D:
how do i set server path?
 

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,922
Best answers
81
Reaction score
700
Do not use 777 you can be hacked
Go to www folder
Code:
cd /var/www
or
Code:
cd /var/www/html
and press comand:

Code:
chown -R www-data:www-data /var/www/html
or
chown -R www-data:www-data /var/www
Code:
chmod -R 755 /var/www/html
or
chmod -R 755 /var/www/html
Or
Code:
chmod -R 755 /var/www/html config/config.php
Would you mind to explain why(and how) is 777 more "hackeable" than 755?
 

sasdasxc

Active Member
Joined
Oct 31, 2017
Messages
64
Best answers
3
Reaction score
26
@Thexamx
A 777 permission on the directory means that everyone has access to read/write/execute (execute on a directory means that you can do a ls of the directory).

755 means read and execute access for everyone and also write access for the owner of the file. When you perform chmod 755 filename command you allow everyone to read and execute the file, owner is allowed to write to the file as well.

But I would suggest not to give 777 permission to all folder and it's all contents. You should give specific permission to each sub-folder in www directory folders.

Ideally give 755 permission for security reasons to web folde
More Info:
What file permissions should I set on web root?
Why shouldn't /var/www have chmod 777
 
Last edited:
Top