Questions tagged [777]

The maximum file permissions (ie Read, Write, and Execute) that can be assigned to a directory or file on a Unix-based operating system (including Linux).

777 = "-rwxrwxrwx" = rwx for all

0 --- no permission
1 --x execute
2 -w- write
3 -wx write and execute
4 r-- read
5 r-x read and execute
6 rw- read and write
7 rwx read, write and execute

The first character in the mode string -rwxrwxrwx indicates file type and is not related to permissions, a couple of examples:

-rwxrwxrwx  // normal file
drwxrwxrwx  // directory
lrwxrwxrwx  // symbolic link
prwxrwxrwx  // named pipe
srwxrwxrwx  // socket

From maketecheasier:

Every file and folder contains 8-bit data that controls the permissions. At its basic binary form, it will be “000”, which means no permission of any form is granted. When you set a “Read” permission, it will add 4-bit to the data, making it “100” (in binary format) or a “4” in the usual decimal format. Setting a “Write” permission will add 2-bit to the data, making it “010” and “2” in decimal form. Lastly, setting an “Execute” permission adds 1-bit to the data, which will result in “001”, or “1” in decimal form. In short:

  • Read is equivalent to ‘4’.
  • Write is equivalent to ‘2’.
  • Execute is equivalent to ‘1’

When we want to set permissions, we just add up the number. For example, to set the permissions to read and write, we will use ‘6’ (4 + 2) for the permission. For read, write and execute, we will use ‘7’ (4 + 2 + 1) for the permission.

30 questions
0
votes
0 answers

How to give 777 permission while creating a zip folder in php

I am trying to create a zip folder but I'm not able to give 777 permission. Please help me out this. Here is my source code: $files = ['13150925581920IMG_0009.PNG','1328684363792113286843637921IMG_0009.PNG']; $random =…
Sandeep
  • 973
  • 2
  • 13
  • 22
0
votes
2 answers

Does path.mkdir()'s updates the file permissions if path already exists and mode is passed?

I have a volume attached in kubernetes with path /var/www/aaa/tmp. That volume was created using path.mkdir() and currently have 755 permissions. It was created with code path.mkdir(parents=True, exist_ok=True) initially. I'm trying to update its…
Underoos
  • 4,708
  • 8
  • 42
  • 85
0
votes
2 answers

Different numbers for CHMOD -R 777

Does somebody know what other numbers to use for sudo chmod -R 777 . I only want to recursively to change read and write permissions. But not to make them executable. Anybody knows the number to use instead of 777 ?
0
votes
3 answers

WHMCS Permissions Error

I currently have a WHMCS configuration. I have the following folders (crons, downloads, attachments, and templates_c), located in a separate directory than the WHMCS installation. I have the correct path labeled in the configuration.php and the…
Theo Jouvin
  • 1
  • 1
  • 1
0
votes
1 answer

Why is it dangerous to have 777 files?

A dummy question, why is it very dangerous to have 777 files when no one can access them without a host ID, username and a password? I know it means all the files and directories will be readable, writable and executable by whole world, But how can…
0
votes
1 answer

Laravel fails to write to /storage with permission 775 - Amazon AWS Linux

I am trying to get my Laravel 5.3 installation to work on a Amazon Linux AMI EC2 instance. So far everything is set up: apache, php, etc.. ok laravel set up in www/html/blog folder permissions were set to 775 (following the AWS docs): drwxrwsr-x …
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
0
votes
1 answer

Write permissions not getting set when using NIO on unix

I am using NIO to set permissions on all directories in a path as below. i am trying to give 777 permissions , however the "w" part is not getting applied...Whats wrong here? import java.io.File; import java.io.IOException; import…
nikel
  • 3,402
  • 11
  • 45
  • 71
0
votes
1 answer

recursively set 777 permissions in java without using NIO

Is there a way to set 777 permissions on a path recursively(so that all directories on the path get 777 permissions) without using NIO. We can do it for the last leaf of a given file by methods in the file class like below import…
nikel
  • 3,402
  • 11
  • 45
  • 71
0
votes
2 answers

How can i get the source of a 777 - CHMOD php file?

A moderator of a forum i own did so. I still can't belive on it, and i can't understand how he did it. Can someone explain me? He said he used only HTTP GET requests The moderator said that the server (nginx) would normally send the output of the…
cedivad
  • 2,544
  • 6
  • 32
  • 41
0
votes
0 answers

What if your server REALLY wants chmod to be 777 within a Wordpress install?

I've just found out that a server I am working on really wants chmod permissions to be set to 777, on quite a lot of WordPress files. This feels very unsafe to me, but there is simply no way around it. I know 777 doesn't generally mean it's always…
Jirosworld
  • 27
  • 6
0
votes
2 answers

How to set permissions of certain folders to 777 on Mac

I need to set the permissions of just 3 specific folders (on my Mac) to 777 I went to CMND+i (get info) but the folder permissions seemed to be Read and Write - but this didn't seem to fix it. I am trying to work out how to do this, because I am…
Toby
  • 45
  • 1
  • 3
  • 7
0
votes
1 answer

Uploading file to FTP using PHP - will not write to server

I'm trying to upload a file to an FTP server. It gets caught in the if statement which states that the directory must be chmode 777 however I have manually chmode 77 every directory in the ftp as well as adding a function in the code. Secondly, I'd…
FootsieNG
  • 809
  • 3
  • 12
  • 27
0
votes
2 answers

Upload file to a 777 folder using PHP

I am working on a school project which involves a Supermarket system and I have a Shop PC (localhost) and a HQ server (hosted on Amazon EC2). One of the requirements is that Shop PC will generate a transaction file (I have a button which generates…
Saurabh
  • 1,055
  • 14
  • 38
0
votes
2 answers

Kunena attachment fails, directory owner issue perhaps?

Just fixing my Joomla and Kunena forum after it was hacked :( Now forum members can't upload attachments successfully, I've ttried changing permissions in the following: public_html/media/kunena/attachments/666 666 being the user id and where the…
Bjorn
  • 285
  • 3
  • 6
  • 19
0
votes
2 answers

Wordpress PHP Safe mode

Possible Duplicate: Is setting the uploads folder 777 permision secure? I am using WordPress on my new host, and when I try to install a plugin I get this; Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid…
Jane
  • 816
  • 2
  • 20
  • 38
1
2