All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
58 views

Delete folders asynchronously

I have a large file system in which I have to delete certain directories from time to time. Currently I have a script which amongst other things, deletes a folder and subsequently generates an email ...
loris's user avatar
  • 232
0 votes
0 answers
176 views

Mount CIFS is seeing directory on network share only if extra directory is created

On my CentOS ver 7, I have mounted drive from Windows Server 2019 (with shared name "Backup-disk"), and on this drive I have two directories ("A" and "B"). Now I have ...
DaniKR's user avatar
  • 103
1 vote
1 answer
257 views

Is it possible to set up an alias on an Active Directory domain controller Linux server? [closed]

We have a Red Hat Enterprise based Linux distro that is the domain controller for a bunch of Win 10 clients. Some clients are not in the right AD domain (they are on a former domain that was used ...
Endre Szatmári's user avatar
0 votes
0 answers
35 views

Directory not read

I have a problem with a user's folder. ls -la shows the permissions as ???? instead of drwx. I tried with sudo chmod ug+rw -R /path/folder to reassign the value but it doesn't change. How can i make ...
Graziano Giacobazzi's user avatar
2 votes
0 answers
162 views

Can OpenLDAP deliver operational attributes by default?

I have configured OpenLDAP with the memberOf overlay and everything works as expected for me. I can see the group memberships in the operational attributes of an object. Now i am running into the ...
user666346's user avatar
0 votes
1 answer
109 views

Errors structure in Openldap

I have a question concerning Openldap. I'm using a solution(PingFederate) that gets errors from openldap to do different things depending on the filter. For example i can say : detect the invalid DN ...
Adam Kejji's user avatar
0 votes
1 answer
840 views

User-Permission on Folder without affecting owner:group

How can I allow a specific user on my Ubuntu desktop to view/open all folders and files in a specific location without affecting or changing the owner:group of that location? Until now I need to ...
Omexlu's user avatar
  • 43
0 votes
1 answer
1k views

SFTP Chroot write in chrooted /

Hey, I'd like to write with the chrooted user in his / but i can't. Example: i have /home/sftponly/ as ChrootDirectory Inside has to be another Directory with Permissions to this User, otherwise i ...
roseroserh's user avatar
0 votes
0 answers
55 views

is the linux directory inode different then the file inode?

Im currently reading the book "How Linux Works" by Brian Ward and on chapter 4.5 it is said "A directory inode contains a list of filenames and corresponding links to other inodes&...
amos-baron's user avatar
1 vote
0 answers
271 views

Compare 2 Directories and Move Differences to a Third directory

Running Ubuntu 20.04 and want to compare two directories called 1 and 2 and move differences to a separate directory called 3, ideally conserving the subdirectories. I am able to get almost the ...
Tebbers's user avatar
  • 11
0 votes
2 answers
154 views

How to permanently remove directory in CentOS?

I have a directory I want to remove in /opt/ [user /] $ sudo su [root /] # cd /opt [root opt] # rm -rf tomcat9 [root opt] # ls [root opt] # ls tomcat9 But i still cannot seem to remove the tomcat9 ...
Noose780's user avatar
0 votes
1 answer
2k views

Mount a directory on a new partition or disk [closed]

I would like to know how to mount a directory on a new partition or disk. I have a directory, example: /u01/app/mylab/data Inside this I have several files and directories, with specific permissions ...
Arnaldo Raxach's user avatar
0 votes
2 answers
533 views

Copying files in Linux keeps full path

I made a script to, every 6 hours, copy a folder to a backup folder, then put them in /var/www/html/backup/. My command to copy the files was cp -vR ~/world ~/backups/Backup\ on\ $date/world My ...
Elijah Ciali's user avatar
1 vote
1 answer
61 views

Linux File System - Folder Removal with Special Charakters

we have an Linux Debian Server in our House as Developer Machine. One of our developers has created accidental an Folder Called Ð?оваÑ? папка How can I Remove this folder. I have tried ...
Nicolay Braetter's user avatar
3 votes
1 answer
14k views

"stat" says "permission denied", even though all the permissions are in place

I have this: ls -al /home/my_user/dir1/dir2/file1.txt -rwxr-xr-x 1 http http 2798 Dec 30 18:18 /home/my_user/dir1/dir2/file1.txt However, I can't stat it: sudo -u http stat /home/my_user/dir1/dir2/...
Pappani's user avatar
  • 41
0 votes
2 answers
689 views

.htaccess password protect a file in a certain directory

I have files with the same name in different directories on the serves (example: stats.php), and I want to password protect some of them (.htaccess file in the root directory). I tried "FilesMatch" ...
Mike's user avatar
  • 143
0 votes
3 answers
1k views

Apache cannot access external drive on Linux Mint

I have a Linux server and a Windows server with a external drive for my website files. The problem only exists in Linux Apache configuration, where I cannot access the files for the sites located on ...
H35am's user avatar
  • 111
2 votes
3 answers
202 views

How to replicate and flatten deep nested subdirectories' names into new folder

Example I have input directory as follows with two branches at the 2nd level (2 and 22) ~/input_directory/1/2/3/4/5/6 ~/input_directory/1/22/3/4/5/6 I want to run a command to populate ~/...
Richard L's user avatar
0 votes
1 answer
40 views

compare 2 directories with different files names and locations of the files

I'm currently having 2 (top level) directories with a lot of sub directories and files. There are a lot of duplicate files between those directories but there is one problem with it, the names of the ...
grezly's user avatar
  • 1
0 votes
1 answer
44 views

Remove files from directory path B which are not found in path A on Linux

I have two paths on same system for example: \mnt\a\data \mnt\b\data There are some directories and/or files in b\data which are not present in a\data. How can I remove those extra directories and/...
Lukasz's user avatar
  • 482
-3 votes
1 answer
2k views

Recursively removing the content of a directory but not a directory itself [duplicate]

I have a directory which contains other directories and files of unknown depth. How can I delete only the content of the directory -- nested directories and files -- but not directory itself? I've ...
Raj's user avatar
  • 129
0 votes
2 answers
184 views

How to upload directory from linux

I'm using Centos 7 Server. I do have specific directory which am looking to automatically upload everything inside it each time the size of it changed in order to save a copy of it all time. so i ...
αԋɱҽԃ αмєяιcαη's user avatar
0 votes
2 answers
402 views

Linux, search for extended attribute value

When a directory contains some files with non-empty extended attributes, all the attribute values can be shown as follows: $ getfattr -d * # file: file1 user.comment="comment1" # file: file2 user....
BowPark's user avatar
  • 103
1 vote
1 answer
693 views

nginx try_files not finding files in large directory (86k files)

To start out, the nginx config: server { listen 443 ssl; server_name example.com; ssl_certificate /example/fullchain.pem; ssl_certificate_key /example/privkey.pem; ...
PitaJ's user avatar
  • 113
4 votes
1 answer
2k views

How can a file moved to a directory with GID-bit set inherit the group ownership

Problem I know that a file that is created in a directory with the GID-bit set it will inherit the diretory's group ownership. This however doesn't work for files that are moved to that directory as ...
Jdz's user avatar
  • 43
0 votes
0 answers
228 views

mounted network disk with cifs doesn't allow to move created folders

I can create, delete and rename folder (as long, as it is stays on the same level) on an cifs connected network disk, but I cannot move them. When I try to move one dir inside of another dir, it gives ...
igoryonya's user avatar
  • 195
-3 votes
3 answers
77 views

What should the owner of `.` and `..` directories be? [closed]

A few questions about the . and .. directories: ls -la drwxr-xr-x 3 root root 4096 Mar 21 12:47 . drwxr-xr-x 60 root root 4096 Mar 15 14:36 .. Are . and .. actually directories or are they like ...
BadHorsie's user avatar
  • 137
0 votes
1 answer
121 views

Linux CLI Make a Tar.Gz with Tar.Gz First-level Directories

Currently, I use this command to make tar.gz archives: sudo tar -zcpvf archive.tar.gz directory1 directory2 directory3 Is there a way to compress multiple archives like above, but instead of ...
GTS Joe's user avatar
  • 199
2 votes
1 answer
1k views

Prevent deletion of folder but let access to everything inside of it

I know there is the +i flag for files and directories, but i have a deeper Problem. Is there a way to prevent a folder from being deleted by an User which should be able to create / access / remove ...
fechnert's user avatar
  • 133
-2 votes
2 answers
2k views

What is best directory for storing uploaded images from my website in linux [closed]

i am building a webpage where a the user can upload images. i am going to use the file-system to store my images. i was wondering what is the best directory to hold such data? is it "var" directory? "...
Ori Price's user avatar
0 votes
1 answer
39 views

List all folders, with size but only in regexp path - LINUX

I have this structure Folder/A Folder/A_SomeoneBefore/ Folder/B Folder/B_SomeoneBefore/ .... Folder/T/TA/TAC/TAC_SomeoneAfter Folder/T/TA/TAF/TAF_SomeoneAfter Folder/T/TD/TDC/...
Pavel's user avatar
  • 417
-2 votes
3 answers
2k views

In Linux what is the difference between a data partition and a folder? [closed]

I believe that examples of data partitions are /usr/ and /bin/. But these are just folders in the root directory, right? So is a data partition a folder in the root directory.
Catbird55's user avatar
  • 173
0 votes
1 answer
184 views

Bash shell copy files on the hidden directory [closed]

Need help with Unix script. how do you use /bin/cp to copy files from /somepath/somedir/somewhere/.temp_folder to /somepath/somedir/somewhere/ my line /bin/cp -r somepath/somedir/somewhere/.[!.]* ...
evilspowa's user avatar
0 votes
1 answer
1k views

Mounted Gluster volume keeps reverting to "root" permissions

Ive got GlusterFS running on an AWS server and its mounted to another AWS server. The folder that is mounted though keeps reverting to "root" ownership, when this happens uploads fail from the web ...
linux-user1111's user avatar
2 votes
3 answers
1k views

tmpfs - auto create whole path when write to file

I have mounted tmpfs .e.g. /tmspfs/cache As we expect, so after restart server is ram empty and all content from mount is away. It is ok. But I have in my system some full path e.g. /tmpfs/cache/...
Pavel's user avatar
  • 417
-1 votes
2 answers
525 views

A linux program/script for keeping certain folders below fixed size, removing oldest files if neccessary? [closed]

E.g. the autotrash would do perfectly if it wasn't bound to monitor trash folders only.
Alexander Gonchiy's user avatar
0 votes
1 answer
51 views

Python code location on debian [closed]

Simple question, which of these is a better directory setup for locating my project and why, as I have seen both recommended on different tutorial sites: Option 1: /var/www/<projectname>/...
Jimmy's user avatar
  • 269
2 votes
3 answers
202 views

Given an original and backup filesystem, how can I find out if any files are missing?

I found from this posting on Stackoverflow, if you just wanted to get a list of corresponding files whose content differs, then you could execute: diff --brief --recursive dir1/ dir2/ ...and trying ...
Florian Mertens's user avatar
1 vote
2 answers
863 views

find all end subdirectories in a tree

given the following structure: oz123@debian:~/ $ tree . . ├── a │   ├── a1 │   ├── a2 │   └── a3 ├── a1 │   ├── a11 │   ├── a12 │   └── a31 ├── b │   └── b1 │   ├── b11 │   │   └── b21 │   ...
oz123's user avatar
  • 1,278
0 votes
1 answer
837 views

How to use a load balancer with apache with php based applications?

I have found that i need to add another server to my setup but my web application is designed with php. Basically, in my application, there is a mkdir command that makes a directory for the user. If i ...
user2604065's user avatar
-5 votes
3 answers
63 views

How to open a directory contains "-"? [closed]

How can I open a directory via PUTTY that contains -? For example the name of dir is: some-thing-dir cd /some-thing-dir not working.
user2301881's user avatar
16 votes
3 answers
50k views

Is there a hard limit to the number of files a directory can have? [duplicate]

Wondering if there is a limit to the number of files that can be stored inside a directory, in CentOS 6. There is one particular directory which could potentially have millions of subdirectories. ...
Juan Carlos Coto's user avatar
36 votes
3 answers
40k views

compare 2 directories and copy differences in a 3rd directory

Running ubuntu 12.04, I want to compare 2 directories, say folder1/ and folder2/ and copy any files that are different to folder3/. There are also nested files, so matching subdirectories should be ...
periklis's user avatar
  • 421
4 votes
3 answers
3k views

How to "cd" to non utf8 directory

How can I change directory to directory that name consists of non ASCII default characters? root@senior:/media/data/hudba/# ls . -l total 3096 -rwxr-xr-x 2 user users 3160192 Jul 31 2006 Lucie BĂ­...
Buksy's user avatar
  • 171
0 votes
1 answer
54 views

Linux directory moved

a directory was moved with mv command in a Linux box, what logs should be looked at for such action? in root bash_history i can see the command was used, unfortunatly bash_history was not recording ...
Vlad's user avatar
  • 45
0 votes
2 answers
275 views

Linux workstation and Active Directory authentication

I read a few articles regarding "How to Authenticate Linux Clients with Microsoft Active Directory" My question before I do it: what will happen to Notebooks that try to login when the Active ...
Shachar ben's user avatar
4 votes
1 answer
1k views

syncing local folders

What is a best way to keep in sync two local folders ? I know I can use rsync -Ra but I need to keep in sync all the time. Is it possible to make rsync sit in background and constantly sync local ...
Tom's user avatar
  • 43
6 votes
2 answers
3k views

Is it necessary to include the /run directory in backups?

I use a variant of the simple script below from the Community Ubuntu Documentation described tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --...
vfclists's user avatar
  • 1,632
1 vote
1 answer
54 views

How to setup usernames for websites

I have a news server. It may be possible that there will be multiple virtual hosts on it. There are two approaches that I see around. One is to login as root and create files under /www/etc, Like; /...
Sinan's user avatar
  • 191
2 votes
2 answers
2k views

linux shell script: how to move all sub folders with a given name?

I'd like to move all sub-folders starting with a given suffix (Blah_ in the example) into an other directory using a linux bash script. Here's what the script looks like: srcDir="/home/me/" ...
Tolaksa's user avatar
  • 165