I have just generated a new Symfony 3 project, and I have realized that directories has 755 permissions. For examppe, in project root directory:
drwxr-xr-x 3 me me 4096 oct 3 21:14 web
drwxr-xr-x 15 me me 4096 oct 10 12:08 vendor
drwxr-xr-x 5 me me 4096 oct 10 12:08 var
drwxr-xr-x 3 me me 4096 oct 10 12:08 tests
drwxr-xr-x 3 me me 4096 oct 10 12:08 src
drwxr-xr-x 2 me me 4096 oct 10 12:08 bin
drwxr-xr-x 4 me me 4096 oct 10 12:08 app
In case my current umask is 0002 so when I create a new directory (mkdir) at /tmp for example, the permissions are 775.
So why the Symfony directories has 755? Why did they choose that? Is this configurable?
Im on Ubuntu 14.04.
Related
I am working on point of sale bootp terminals. The client application, OS etc. and all its files live under /opt/posterm/x86_64/.../
ll /opt/posterm/x86_64
total 16
lrwxrwxrwx. 1 root root 7 Jul 31 2020 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Sep 21 2021 boot
drwxr-xr-x. 2 root root 30 Jul 21 2021 dev
drwxr-xr-x. 84 root root 8192 Nov 22 2021 etc
drwxr-xr-x. 2 root root 6 Jul 31 2020 home
lrwxrwxrwx. 1 root root 7 Jul 31 2020 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jul 31 2020 lib64 -> usr/lib64
drwxr-xr-x. 3 root root 27 Jul 29 2021 media
drwxr-xr-x. 2 root root 6 Jul 31 2020 mnt
drwxr-xr-x. 3 root root 24 Sep 15 2021 opt
dr-xr-xr-x. 2 root root 6 Jul 31 2020 proc
dr-xr-x---. 2 root root 112 Sep 29 2021 root
drwxr-xr-x. 14 root root 178 Jul 21 2021 run
lrwxrwxrwx. 1 root root 8 Jul 31 2020 sbin -> usr/sbin
drwxr-xr-x. 2 root root 6 Jul 31 2020 srv
dr-xr-xr-x. 2 root root 6 Jul 31 2020 sys
drwxrwxrwt. 7 root root 93 Oct 1 2021 tmp
drwxr-xr-x. 12 root root 144 Jul 21 2021 usr
drwxr-xr-x. 20 root root 278 Sep 21 2021 var
I was able to create the service however im not certain its right since the is-enabled command output shows me nothing. Why?
[root#zzpoxxxx]# systemctl enable posterm.service --root=/opt/posterm/x86_64
Created symlink /opt/posterm/x86_64/etc/systemd/system/multi-user.target.wants/posterm.service → /etc/systemd/system/posterm.service.
systemctl is-enabled --root=/opt/posterm/i386 posterm.service
systemctl is-enabled posterm.service --root=/opt/posterm/i386
[root#zzxxxxx]# echo $?
1
system]# find / -name posterm.service |xargs ls -al
lrwxrwxrwx. 1 root root 35 Nov 15 13:37 /opt/posterm/x86_64/etc/systemd/system/multi-user.target.wants/posterm.service -> /etc/systemd/system/posterm.service
-rw-r--r--. 1 root root 236 Nov 15 11:43 /opt/posterm/x86_64/etc/systemd/system/posterm.service
-rw-r--r--. 1 root root 236 Nov 15 11:38 /opt/posterm/x86_64/usr/lib/systemd/system/posterm.service
any help much appreciated!?
thank you!
I have had a good internet search for this problem, and can find nothing at all.
I have just installed Manjaro and Linux Mint on a friend's Laptop.
I am not new to Linux, used Gentoo, Arch, Ubuntu, CentoOS for a good 20 years or more, and he is an experienced Ubuntu & Mint man.
He has an encrypted partition which is mounted on a folder in his Home Folder called rob_docs with Ownership set to rob:rob
The user rob as an UID of 1000 on each Distro.
When he saves files to rob_docs on Manjaro they are not seen in Mint and vice-versa.
I cannot see any reason for this. The /dev/mapper/rob_docs is the same in each distro as is the luks keyfile in /root/
Here are the relevant permissions from each Distro:
Manjaro
$ ls -l ~/
total 4
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Desktop
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Documents
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Downloads
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Music
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Pictures
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Public
drwxr-xr-x 5 rob rob 4096 Apr 8 11:38 rob_docs
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Templates
drwxr-xr-x 1 rob rob 0 Apr 7 13:08 Videos
$ ls -l ~/rob_docs
total 36
drwxr-xr-x 2 rob rob 4096 Apr 7 17:12 firefox
-rw-r--r-- 1 rob rob 10961 Apr 8 11:38 grub-info-manjaro.txt
drwxr-xr-x 2 rob rob 4096 Apr 7 17:21 info
drwx------ 2 rob rob 16384 Apr 4 13:21 lost+found
Mint
$ ls -l ~/
total 40
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Desktop
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Documents
drwxr-xr-x 3 rob rob 4096 Apr 7 12:14 Downloads
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Music
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Pictures
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Public
drwxrwxr-x 6 rob rob 4096 Apr 8 11:00 rob_docs
drwxrwxr-x 3 rob rob 4096 Apr 7 13:32 ROB-FG
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Templates
drwxr-xr-x 2 rob rob 4096 Apr 5 19:49 Videos
$ ls -l ~/rob_docs
total 52
-rw-rw-r-- 1 rob rob 0 Apr 6 09:31 EmptyFile.txt
drwxrwxr-x 3 rob rob 4096 Apr 7 18:39 firefox
-rw-rw-r-- 1 rob rob 9047 Apr 8 11:00 grub-info.txt
drwxr-xr-x 26 rob rob 12288 Mar 29 15:24 TEFL_course
drwxrwxr-x 2 rob rob 4096 Apr 7 18:36 test_folder
drwxr-xr-x 3 rob rob 4096 Apr 8 10:46 video_recordings
As you can see it is as if they are two different partitions, but they are not. The UUID to mount /dev/mapper/rob_docs is identical in each /etc/fstab file.
Why is this happening?
Solved this by reinstalling Mint without the boot option - From the cmmmand line in the Live DVD:-
ubiquity -b
Because Manjaro and another Linux Distro only use one EFI Partition so Manjaro is used to update grub for the boot menu.
Then recreated the LUKS Partition and all was well, both distros would write and read from the LUKS Partiton
How does one specify the permissions for files output by sbt? I need these to be set correctly in order to be able to test the code with my local Apache server.
In the scalaJS project after a clean fastOptJS I
can see that the launcherapp-fastopt.js files are user read only.
$ ls -al target/scala-2.13/
total 240
drwxr-xr-x 6 hjs staff 192 23 Oct 11:08 .
drwxr-xr-x 5 hjs staff 160 23 Oct 11:08 ..
drwxr-xr-x 6 hjs staff 192 23 Oct 11:08 classes
-rw------- 1 hjs staff 69861 23 Oct 11:08 launcherapp-fastopt.js
-rw------- 1 hjs staff 48380 23 Oct 11:08 launcherapp-fastopt.js.map
drwxr-xr-x 3 hjs staff 96 23 Oct 11:08 update
Apache won't see it with those permissions so I have to change the mode on the files like this:
$ chmod -R a+rX target/
$ ls -al target/scala-2.13/
total 240
drwxr-xr-x 6 hjs staff 192 23 Oct 11:08 .
drwxr-xr-x 5 hjs staff 160 23 Oct 11:08 ..
drwxr-xr-x 6 hjs staff 192 23 Oct 11:08 classes
-rw-r--r-- 1 hjs staff 69861 23 Oct 11:08 launcherapp-fastopt.js
-rw-r--r-- 1 hjs staff 48380 23 Oct 11:08 launcherapp-fastopt.js.map
drwxr-xr-x 3 hjs staff 96 23 Oct 11:08 update
Is there a way to specify the rights in sbt for the produced artefacts so I don't have to chmod everytime I compile?
For a use case see the Launcher App
I'm currently using Symfony 3.4.8 with up to date dependencies.
In production, symfony creates "prod?" directory :
drwxrwxrwx 4 www-data www-data 434 Apr 20 10:26 .
drwxr-xr-x 4 www-data www-data 45 Apr 20 10:21 ..
-rw-rw-rw- 1 www-data www-data 165 Apr 20 10:26 annotations.map
drwxrwxrwx 2 www-data www-data 15K Apr 20 10:26 ContainerDcnvgsr
-rw-rw-rw- 1 www-data www-data 106K Apr 20 10:26 srcProd?DebugProjectContainerCompiler.log
-rw-rw-rw- 1 www-data www-data 628 Apr 20 10:26 srcProd?DebugProjectContainerDeprecations.log
-rw-rw-rw- 1 www-data www-data 784 Apr 20 10:26 srcProd?DebugProjectContainer.php
-rw-rw-rw- 1 www-data www-data 21K Apr 20 10:26 srcProd?DebugProjectContainer.php.meta
-rw-rw-rw- 1 www-data www-data 347K Apr 20 10:21 srcProd?DebugProjectContainer.xml
-rw-rw-rw- 1 www-data www-data 21K Apr 20 10:21 srcProd?DebugProjectContainer.xml.meta
drwxrwxrwx 2 www-data www-data 0 Apr 20 10:21 vich_uploader
var/cache directory :
drwxr-xr-x 4 www-data www-data 45 Apr 20 10:21 .
drwxr-xr-x 4 www-data www-data 44 Apr 19 11:38 ..
drwxr-xr-x 9 www-data www-data 556 Apr 19 11:42 prod
drwxrwxrwx 4 www-data www-data 434 Apr 20 10:26 prod?
public directory :
drwxr-xr-x 3 www-data www-data 104 Apr 19 11:39 build
drwxr-xr-x 2 www-data www-data 27 Apr 19 11:38 bundles
drwxrwxrwx 2 www-data www-data 98 Apr 19 09:27 imports
-rw-rw-rw- 1 www-data www-data 1242 Apr 19 09:27 index.php
Most of users have the following error :
(1/1) FatalThrowableError
Parse error: syntax error, unexpected
'DebugProjectContainer' (T_STRING), expecting ',' or ')'
The app works for few users with the correct "prod" cache directory and no error.
How can I fix this ?
There was a special character (^M) at the end of each line in the .env file due to a bad copy/paste.
¯\_(ツ)_/¯
I'm trying to install the wordpress plugging but just can't bypass this FTP credential page.
I have tried:
1, add FS_METHOD: 'direct' to wp-config.php
2, change permission on the file folder, see blow,
Still just can't have it working, please help
:/var/www/html/wordpressblog# ls -la
total 196
drwxr-xr-x 5 nobody nogroup 4096 Jan 15 08:43 .
drwxr-xr-x 3 nobody nogroup 4096 Jan 15 07:36 ..
-rw-r--r-- 1 nobody nogroup 418 Sep 25 2013 index.php
-rw-r--r-- 1 nobody nogroup 19935 Jan 3 2017 license.txt
-rw-r--r-- 1 nobody nogroup 7413 Dec 12 2016 readme.html
-rw-r--r-- 1 nobody nogroup 5434 Sep 23 20:21 wp-activate.php
drwxr-xr-x 9 nobody nogroup 4096 Nov 30 03:06 wp-admin
-rw-r--r-- 1 nobody nogroup 364 Dec 19 2015 wp-blog-header.php
-rw-r--r-- 1 nobody nogroup 1627 Aug 29 2016 wp-comments-post.php
-rw-r--r-- 1 nobody nogroup 2901 Jan 15 08:43 wp-config.php
drwxrwxrwx 4 nobody nogroup 4096 Nov 30 03:06 wp-content
-rw-r--r-- 1 nobody nogroup 3669 Aug 20 12:37 wp-cron.php
drwxr-xr-x 18 nobody nogroup 12288 Nov 30 03:06 wp-includes
-rw-r--r-- 1 nobody nogroup 2422 Nov 21 2016 wp-links-opml.php
-rw-r--r-- 1 nobody nogroup 3306 Aug 22 19:52 wp-load.php
-rw-r--r-- 1 nobody nogroup 36583 Oct 13 10:10 wp-login.php
-rw-r--r-- 1 nobody nogroup 8048 Jan 11 2017 wp-mail.php
-rw-r--r-- 1 nobody nogroup 16246 Oct 4 08:20 wp-settings.php
-rw-r--r-- 1 nobody nogroup 30071 Oct 19 01:36 wp-signup.php
-rw-r--r-- 1 nobody nogroup 4620 Oct 24 06:12 wp-trackback.php
-rw-r--r-- 1 nobody nogroup 3065 Sep 1 2016 xmlrpc.php
/var/www# ls -la
drwxr-xr-x 3 root root 4096 Jan 10 10:28 .
drwxr-xr-x 12 root root 4096 Jan 10 10:28 ..
drwxr-xr-x 3 nobody nogroup 4096 Jan 15 07:36 html
The wp-content directory needs to be owned by the same user and group than the webserver. You might need to change these settings, e.g. in the httpd.conf if you are using apache
I encountered this before when I setup my own web server using nginx. The whole /var/www/html folder and all descendants need to be owned by the same user running nginx worker to enable install plugin without ftp inside wordpress dashboard for my case. Hope it helps!