Tag Info

New answers tagged

0

Based on your question I'm going to make an assumption. The web server process is in the same group as the group ownership of the directory. You removed the execute (x) bit from the directory permissions and only gave it back to the group. This means that the directory owner doesn't have execute permission and that is required to be able to change ...


0

Can you clarify what "rooted directory" means? Also you didn't specify a linux distro so my commands will be based on Ubuntu. Without an ACL your options are limited. I'm assuming you want neither of these users to own the /bucket directory. Create a group (we'll call it "readers" in my example) and add User2 to group "readers". addgroup readers adduser ...


0

i also don't read necessary to set up chroots . to prevent from go up parent directories , assign a strict permission . $ mkdir --parent 1/2/3 $ ls 1 2 $ chmod 100 1 $ ls 1 ls: cannot open directory 1: Permission denied $ ls 1/2 3 if we want to grant a user acces to /home/1 but confine the user not to see what are other materials in /home we make /home ...


0

With install, you can create a directory with a specific owner, group, and mode: install -d -o <user> -g <group> -m <mode> <path>


0

On your LXC host (I'm assuming Ubuntu here): Install the virtualbox-dkms, linux-headers-generic, build-essential packages and check the kernel modules are loaded: myhost$ sudo /etc/init.d/virtualbox status VirtualBox kernel modules are loaded. Get the VirtualBox device numbers (10, 55/56/57 in my case): myhost$ ls -la /dev | grep vbox crw------- 1 root ...


3

The nobody user is a pseudo user in many Unixes and Linux distributions. According to the Linux Standard Base, the nobody user and its group are an optional mnemonic user and group. That user is meant to represent the user with the least permissions on the system. In the best case that user and its group are not assigned to any file or directory (as owner). ...


1

The user who can login as nobody can change these files, but normally the system is setup so this is not possible. On my debian based system the entry in the /etc/password file is: nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin and /usr/sbin/nologin gives: This account is currently not available. You can only change this as user root, as ...


1

This file has no extended attributes (actually ACLs), or more precisely, what you see in the owner@, group@ and everyone@ lines are the default ACLs for a 0700 file. Should you really want to remove for all users outside the owner even the ability to know the attributes of the file itself, you might at your own risks use these (untested on that file) ...


1

You are basically asking two separate questions. How to set permissions on your local system to mirror the production one? You need to know the server configuration - in this case it includes configuration of the http daemon (httpd aka Apache in this case) - usually found in /etc/httpd or /etc/apache). You also need to know with what credentials daemon ...


2

r allows listing — just the names. w deleting and adding. t prevents deleting — if you don't own it. x allows navigation — stating a file or directory: reading meta data, reading meta-data is needed to be able to access, add or delete a file within the directory. If you can not navigate, then you can not delete, add, or anything else.


0

or you do in android terminal: ...$ su ...# setenforce 0


0

Answering this question because it'd bad form to just edit your question to put the answer inline (really, just answer your own question, it's okay if done in good faith). I had a similar problem - jobs started via cron appearing to work the first few times, but then failing. The symptoms all traced back to an inability to access the user's home directory ...


0

Sorry, I would add this as a comment to previous answer, but don't have the reputation. If a friendly mod converts, I'd appreciate. Alex, is it possible that both configurations point to /var/www as DocumentRoot outside the VirtualHost directive? Have you considered changing that?


0

That looks like file corruption. I would try running fsck on the system to see if it can recover the files/fix the filesystem corruption. Example 1: Using the shutdown command [root]# shutdown -rF now Example 2: Force fsck on boot using /forcefsck file When you create a /forcefsck file you will force the Linux system to perform a full file system ...


0

I'd say by looking at the output, it is a bit strange. I believe you have a filesystem corruption or even a failure of the disk. You never did say if you looked into your log files and found anything bad. I'll assume that the disk containing these files are directly connected to your system. First attempt to take a backup of the failed disk (if you can). ...


0

It seems this simple fix solved the problem: http://ezref.info/Solved+-+(13)+Permission+denied%3A+.htaccess+pcfg_openfile%3A+unable+to+check+htaccess+file,+ensure+it+is+readable.html I am not sure I understand why or how though?


1

The obvious answer is sometimes the correct one.  You need to write to the cache directory, so you need write permission to the cache directory.  The fact that you're able to do the ls -l demonstrates that you have all the necessary access to the releases directory. You can get the desired access by either adding your user to the nginx group or changing the ...


0

This is a problem of no polikit program to ask you for the password. I use lxpolkit for this, here is part of my .xinitrc ... some other things to run /usr/lib/x86_64-linux-gnu/lxpolkit & exec dbus-launch i3


1

The pattern /home/ec2-user/bitcoin/*/ expands to the list of subdirectories of the directory /home/ec2-user/bitcoin, because of the trailing slash. (Except that directories whose name starts with a . are omitted.) If /home/ec2-user/bitcoin doesn't contain any subdirectory, then the pattern doesn't match anything, so it's left unmodified. Aside: don't run ...


2

Subject to certain assumptions that the target user can actually access the file in its original location, the following approach could work: SRC='/path/to/existing/file' DST='/path/to/new/file' su target_user sh -c "ln -f '$SRC' '$DST'" && rm -f "$SRC" This "moves" the file to the new user's location, but does not change the ownership or ...


0

You can su to any user, if you know there password. (for sudo you need to be a sudoer, and know your own password). So make the files readable and directory writeable(for deletion) by the other user, add files to a shared group, or use access-control-lists (ACLs) setfacl (what are the different ways to set file permissions etc on gnu/linux) Then su other ...


1

You could require that all your users set default permissions to others=read (files) and others=read+execute (directories), so that your "root" account could read them. You could change NFS server providers to somewhere that permits no_root_squash. You could create the set of "fake" userids on your client machine, and then iterate across them, running ...


0

I think part of the problem is the way you've defined your variables. Rather than writing this: MAIN_DIR=/home/ec2-user/dir/ LAST_DIR=$(ls -d -t ${MAIN_DIR}*/ | head -1) I'd recommend you omit the trailing / from MAIN_DIR and use it where required, like this: MAIN_DIR=/home/ec2-user/dir LAST_DIR=$(ls -d -t ${MAIN_DIR}/*/ | head -1) This, I suspect, may ...


0

The best answer to my own question is found in the answer to another post: vim: create file with +x bit. That makes this question essentially a duplicate. I think I'll delete this question unless someone sees a reason to keep it.


2

If you automate things with scripts and make scripts on a regular basis, you should automate the script creation...with a script. So instead of calling: vi some_new_program.py you should have a script newpy: #!/bin/bash echo '#!/usr/bin/env python' > "$1" echo '# coding: utf-8' >> "$1" echo '' >> "$1" chmod +x "$1" vi +3 "$1" Of course ...


0

You can reduce the risk of a persistent exploit by making sure that the service is not able to create an executable file anywhere. For that, make sure that all the filesystems that the service can access meet at least one of the following conditions: mounted read-only mounted with the noexec option contains no directory that is writable by the service ...


0

Here’s an approach that should, theoretically, work.  It’s too much effort for me to develop even a proof-of-concept; you may reject it for the same reason.  And, strictly speaking, this is not “using the Linux permission scheme.” Get an open source file server. Modify it to enforce the rules you want (i.e., users can create files in directories that they ...


0

You can use an ACL to deny all users write and execute permissions and then explicitly allow only the service account user to only have the full rwx. http://linux.die.net/man/1/setfacl


0

As i can see there is no write permission to group & others, So they cant create any file/directory here. you just need to make sure that if you remove write permission from root, what will happen?


1

Run this one command, no need to restart any service & server : # setenfore 0 To check selinux status : # getenforce or edit this file : /etc/sysconfig/selinux to include SELINUX=disabled Doing so will require a reboot.


4

When a directory has "x' (or searchable) permission, it is possible that specific files under a directory having for example 111 (--x--x--x) permission can be accessed if their name is known AND the permission of the destination file allows it. Directories with 'r' permission allow programs such as ls to basically open the directory as a file and read it ...


1

Instead ls use find -type: File is of type: b block (buffered) special c character (unbuffered) special d directory p named pipe (FIFO) f regular file l symbolic link s socket D door (Solaris) and find -perm: -perm mode File's permission bits are exactly mode (octal or symbolic). Since an exact match is ...


1

You need root access or request your system admin to allow sudo privilege to your user account 'axel'. If you do have root access, log in as root and execute visudo command and enter the following at the end of the file to allow 'axel' user to be able to run vim with sudo. axel ALL = /usr/bin/vim The above will only let you sudo to vim. You can give all ...


-1

Unmount shares as root Make required changes with chown and chmod reboot and checkout the shares are with proper rights


0

which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell). With bash there is a "umask" command, try 'help umask' in bash. e.g. umask 0000; wget htpp://


-1

For drwxr-xr-x it is: chmod 755 the_path_to_target For drwxrwxr-x it is: chmod 775 the_path_to_target


1

the permission to move/rename a dir, comes from the permission of the ".." dir (containing dir), not from the dir itself. Simple testcase $ mkdir testdir/subdir -p $ chmod -w testdir $ mv testdir/subdir testdir/othersub mv: das Verschieben von »testdir/subdir“ nach »testdir/othersub“ ist nicht möglich: Keine Berechtigung ==> no permission


3

To apply those permissions to a directory: chmod 755 directory_name To apply to all directories inside the current directory: chmod 755 */ If you want to modify all directories and subdirectories, you'll need to combine find with chmod: find . -type d -exec chmod 755 {} +


3

To get all the info provided by ls -l for a single file or folder, use the -d option and specify the file: ls -ld filename


2

If your intention is to do something depending on the file permission then in some cases you can consider simple test (aka [ or [[) conditional statement: -r file exists and read permission is granted -w file exists and write permission is granted -x exists and execute permission is granted For example: [ -w file ] && echo foo >> file


1

As "permissions" doesn't just cover octal unix permissions on modern Linux systems, I'd like to elaborate a little: Apart from stat -c %a file @vinc17 suggested, there's stat -c %C file for the SELinux context on RHEL Systems, and getfacl file for volumes using ACLs. namei -m /path/to/file might be helpful for finding out all octal permissions leading down ...


4

To just get the mode: stat -c %a file (where file can also be a directory). Note: this is with the stat command from the GNU Coreutils. Otherwise the solution is system dependent.


1

Some reading: For the d questions: This tells you the Unix file type: By default Unix have only 3 types of files. They are.. - - Regular files d - Directory files Special files(This category is having 5 sub types in it.): b - Block file c - Character device file p - Named pipe file or just a pipe file l - Symbolic link file s - Socket file Read more: here. ...


15

So, permissions in Linux are very important. I will try to make a short explanation. For pieces of a file mode Every Unix file has a set of permissions that determine whether you can read, write, or run the file. Running ls -l displays the permissions. Here’s an example of such a display: -rw-r--r-- 1 user somegroup 7041 Mar 26 19:34 somefile I attach a ...


41

I'll answer your questions in three parts: file types, permissions, and use cases for the various forms of chmod. File types The first character in ls -l output represents the file type; d means it's a directory. It can't be set or unset, it depends on how the file was created. You can find the complete list of file types in the ls documentation; those ...


7

d means it is a directory, if you have a file it is - and if it is a link you will find an l. It can't be set/unset. If you use 0777 as permissions you are giving full control (read+write+execute) to every user/group of the system. It is a lazy way to solve problems when you have users/groups that can't access directories/files. For example, if you list ...


0

After long time, I am able to find the answer. Problem: ==> The hrsupport not able to cd to home/someone/public_html, which is having nobody as a group Solution: ==> I added the hrsupport user to the group nobody Problem Solved.


0

The previous answers assume that root has full access to everything. While this is true on most Unix variants, it is only partially true on modern (since the late 90's; kernel 2.2) Linux kernels. On modern Linux, elevated privileges are controlled by a capabilities model. By default, the kernel grants all capabilities to a program if it's running as UID ...


0

On my Ubuntu system it suffices to remove the file /media/username.


1

Edit: Because yaan is a directory ,you have to give the execute permission like that: sudo chmod 744 yaan Explanation: 7 => give the read, write, and execute to the Owner. 4 => give the read to the Group. 4 => give the read to the Others. From the chmod manual page execute/search only if the file is a directory or already has ...



Top 50 recent answers are included